How variables are saved in Python and Rust. Side by Side 7: dict/HashMap

Series article to show how variables work in Python and Rust. Give us a better understanding of both languages. This is the 7th article about dict/HashMap.

Marshal SHI
Geek Culture

--

Image by Author

Background

In this series of articles, I will show how variables work in Python and Rust side by side such that we could have a better understanding of both. In this article, we will check how dict / HashMap works in both.

dict / HashMap is playing a huge role in our systems. Like Matt Kulukundis, google engineer, said 1% of CPU in google is processing Hash Table and 4% of RAM is occupied by Hash Table in the CppCon 2017 Talk. SO, let’s dig more into how it saves in Python and Rust.

In addition, I am not comparing which language is better. They all have their pros and cons. Also, please comment if there is anything that my understanding is wrong.

It has been a long time since my previous article was updated. A lot of things have happened in recent days. I hope everyone is safe and #NoWars.

Environment

Python: version 3.9.7

--

--

Marshal SHI
Geek Culture

Robots make our life easier | Robotics, Reinforcement Learning, Web, Python, Rust & Life Hacking. At MotivEdge.io