Maxim
Maxim
MModular
Created by Niclas Overby on 11/19/2024 in #questions
Modular on Bluesky
+1
3 replies
MModular
Created by fuckAllTechCompanies on 10/30/2024 in #questions
How can I see the peak memory usage of a datastructure like alist in mojo?
Right, I did not suggest to use Scalene for Mojo, but try it for Python memory profiling.
28 replies
MModular
Created by fuckAllTechCompanies on 10/30/2024 in #questions
How can I see the peak memory usage of a datastructure like alist in mojo?
For Python memory profiling I would recommend Scalene https://github.com/plasma-umass/scalene as it provides data on Python and native memory usage.
28 replies
MModular
Created by Martin Dudek on 10/11/2024 in #community-showcase
Mojo dictionary benchmarks
Please do. If you have the time. I have two PR streams in std lib in flight, One stream is hash related, the over is Unicode upper/lower case related. And I still wanted to write a proposal for code point / grapheme cluster indexing and small string optimizations based on my experiments with Crazy string. And I have to present at dotAI next week 😅. So any help is greatly appreciated.
69 replies
MModular
Created by Martin Dudek on 10/11/2024 in #community-showcase
Mojo dictionary benchmarks
I love it 😄
69 replies
MModular
Created by Martin Dudek on 10/11/2024 in #community-showcase
Mojo dictionary benchmarks
I am a bit behind on multiple things, but I will try to contribute to this repo!
69 replies
MModular
Created by Martin Dudek on 10/11/2024 in #community-showcase
Mojo dictionary benchmarks
Sorry if I am too direct in the messages. I really like the idea of the benchmark, great work!
69 replies
MModular
Created by Martin Dudek on 10/11/2024 in #community-showcase
Mojo dictionary benchmarks
One more thing regarding CompactDict, there is an upsert method to mutate or add a value for key, this should be a bit faster as it translates to only one keys lookup (hashing of the key), but one could argue that it makes the benchmark unfair as other dicts do not provide such method.
69 replies
MModular
Created by Martin Dudek on 10/11/2024 in #community-showcase
Mojo dictionary benchmarks
Generally if we want to benchmark a Dict where key is string and value is int, we should decouple the creation of keys from the actual dictionary operations. In my experiments Compact dict was faster than Python stdlib dict, so my suspicion is that the usage of str(i*2) might lead to a slow down. It woudl be nice if the keys would be generated outside of the benchmark, say by creating a List[String] and the references are used as keys.
69 replies
MModular
Created by Martin Dudek on 10/11/2024 in #community-showcase
Mojo dictionary benchmarks
The Rust benchmark is slightly different as the dict type is dic: HashMap<usize, usize> hashing a usize is much cheaper than hashing a string.
69 replies
MModular
Created by Krisztian Szucs on 7/19/2024 in #community-showcase
Firebolt: In-progress implementation of Apache Arrow in Mojo
🙏
26 replies
MModular
Created by bunny on 6/21/2024 in #questions
software cost estimating
Reminded me of my game dev days. We had multiple city builder games developed at the company. My team built a game with just ~12K LOC of production code and ~36K LOC of test code in one year. Other team had ~100K LOC production code and no tests in 2-3 years. Just looking at the LOC is like buying software by the byte 😄. 2GB = 2M $. 😜
84 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
mojo-sort
Long story short with just < you might get a undefined behaviour and it is also unstable (I think. :))
47 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
mojo-sort
It's is also discussed in the video I posted above here is the link with th etime stamp directly relevant for the comparison function https://youtu.be/jz-PBiWwNjc?si=BQLYQYj-BTusYjy-&t=827
47 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
mojo-sort
Thanks @dan13llljws ! I will have a look
47 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
mojo-sort
Please let me know if you do! There are also benchmarks in the repo.
47 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
mojo-sort
Have you had a look at my repo and algorithms there? Curious how they compare to what you implemented.
47 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
mojo-sort
Oh I forgot to post the link to mentioned PR: https://github.com/modularml/mojo/issues/3022
47 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
mojo-sort
BTW many other standard libraries use pattern-defeating quicksort (https://youtu.be/jz-PBiWwNjc?si=2ad9-LvxRbA_S8VY). @dan13llljws if you intend in writing a quick sort derivative I think it will be more interesting. But on the other hand
47 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
mojo-sort
No, I am having this PR in the pipeline to introduce benchmark for the sorting of scalars and a start with a data driven approach for algorithm optimizations. What I had in mind is, if you have an algorithm improvement you want to contribute, first make a PR with a separate benchmark where you execute the current algorithm and the contending algorithm. As there is no infrastructure to check performance on different hardware we ask Modular folks and other contributors to run benchmarks locally and share results. Based on those we can discuss if it is suitable to replace current algorithm with provided one, or maybe just add another algorithm to the module.
47 replies