ModularM
Modular•16mo ago•
68 replies
Martin Dudek

Mojo dictionary benchmarks

I've published a GitHub repository intended as a baseline for comparing the performance of various dictionary implementations in Mojo, with Python and Rust implementations as additional references. You can find it here: https://github.com/dorjeduck/mojo-dictionary-benchmarks.

My hope for this is to serve as a foundation for community discussions on improving Mojo's dictionary performance , especially since current results show Python and Rust implementations with significant performance advantages. The best Mojo approach I am aware of so far is @Maxim's compact-dict: https://github.com/mzaks/compact-dict

My current focus on dictionaries is driven by the desire to improve the performance of my tokenizer implementation in https://github.com/dorjeduck/minbpe.mojo.

All comments and contributions are most welcome. I quickly put this together to provide a starting point for discussions. Thanks! šŸ™
benchmarks.png
GitHub
A fast and compact Dict implementation in Mojo šŸ”„. Contribute to mzaks/compact-dict development by creating an account on GitHub.
GitHub - mzaks/compact-dict: A fast and compact Dict implementation...
Was this page helpful?