Using Python's dictionary in Rust (instead of hashbrown) can bring algorithm speeds close to Python's own dictionary performance. Since Python's dictionary follows a FIFO algorithm, we can use the dictionary directly and just add features like memory management and maxsize.
This way, most algorithms gain significant speed improvements, and a lot of overhead is eliminated.
Of course, with this change, features like capacity control and shrink_to_fit are lost.
Also in this way library can give you more control and access to everything.
Using Python's dictionary in Rust (instead of hashbrown) can bring algorithm speeds close to Python's own dictionary performance. Since Python's dictionary follows a FIFO algorithm, we can use the dictionary directly and just add features like memory management and maxsize.
This way, most algorithms gain significant speed improvements, and a lot of overhead is eliminated.
Of course, with this change, features like capacity control and shrink_to_fit are lost.
Also in this way library can give you more control and access to everything.