Modern Dictionaries by Raymond Hettinger
SF Python9 HN recommenders · recommended in 9 months, 2016–2025
talk · intermediate · evergreen · 2016–2025 on HN
Python core developer Raymond Hettinger explains how Python's dictionary implementation evolved into the compact, ordered dict in Python 3.6. He uses pictures and small bits of pure Python, and covers key-sharing, compaction and versioning.
HN treats it as the definitive, engaging talk on hash table internals and Python dict ordering, and recommends it in tech-talk lists.
Up next
1 mo on HNThe Unbeatable Game from the 60s: Dr NIM
Stand-up Maths
1 HN recommend · 2016–2023
3 mo on HNWhat a Japanese Moving Company in Tokyo is like
Paolo fromTOKYO
3 HN recommender · 2020–2025
1 mo on HNThe Lighthill debate on Artificial Intelligence: "The general purpose robot is a mirage"
Pierre-Yves Oudeyer
1 HN recommend · 2019–2025
3 mo on HNFluorine - Periodic Table of Videos
Periodic Videos
4 HN recommender · 2015–2021
5 mo on HNIrving Finkel | The Ark Before Noah: A Great Adventure
The Institute for the Study of Ancient Cultures
4 HN recommender · 2021–2025
2 mo on HNThe Lighthill Debate (1973) - part 1 of 6
bilkable
2 HN recommender · 2016–2021
4 mo on HNReact Today and Tomorrow and 90% Cleaner React With Hooks
React Conf
4 HN recommender · 2019–2025
2 mo on HNSurreal Numbers (writing the first book) - Numberphile
Numberphile
3 HN recommender · 2016–2022
18 mo on HNRuby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich
Confreaks
17 HN recommender · 2013–2026
16 mo on HNThe spelled-out intro to neural networks and backpropagation: building micrograd
Andrej Karpathy
17 HN recommender · 2022–2025
16 mo on HNHow Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
15 HN recommender · 2017–2025
15 mo on HNRailsConf 2014 - All the Little Things by Sandi Metz
Confreaks
15 HN recommender · 2015–2025
12 comments from Hacker News
▶ this video Modern Dictionaries by Raymond Hettinger The official description of this talk is below, but personally, I'd watch any video with "Raymond Hettinger" in the title. > Python's dictionaries are stunningly good. Over the years, many great ideas have combined together to produce the modern implementation in Python 3.6. This fun talk is given by Raymond Hettinger, the Python core developer responsible for the set implementation and who designed the compact-and-ordered dict implemented in CPython for Python 3.6 and in PyPy for Python 2.7. He will use pictures and little bits of pure python code to explain all of the key ideas and how they evolved over time. He will also include newer features such as key-sharing, compaction, and versioning. This talk is important because it is the only public discussion of the state of the art as of Python 3.6. Even experienced Python users are unlikely to know the most recent innovations.
Python dictionaries: A Confluence of Great Ideas (also known as Modern Dictionaries) by Raymond Hettinger ▶ this video
Raymond Hettinger gave a presentation a few weeks ago on the evolution of the Python dict implementation - one of the most insightful videos I've seen in a long time. ▶ this video
You're welcome! I deliberately didn't go in to that for a few reasons. 1. It would have made this article very, very long. 2. It's a bit out of scope for an article on hashing. 3. I think I might give hash maps their own article in future. Hash maps are fantastically deep. So many different ways to do it. You'll find a lot of material online but I'd recommend Raymond Hettinger's talk on how Pythons hash map data structure has evolved over time: ▶ this video .
As far as I know, it was implemented by Raymond Hettinger. This is a very interesting talk about the new tech: ▶ this video
Raymond Hettinger does or did a few talks on dictionaries too. He covers the history of dictionaries in python and how they evolved. It was mentioned in the article's comment section. ▶ this video
I don't know if it is part of the bests, but very interesting anyway: Modern Dictionaries by Raymond Hettinger [1] It's about Python 3.6 dictionaries improvements. [1] ▶ this video
Actually they optimized the hashmap, and it turned out a side effect of the optimization was insertion order. First implemented in pypy, then ported to cpython 3.6. Talk by Raimond Hettinger about the new implementation with several other implementations: ▶ this video
This has been changed in Python 3.6 only, due to a change in dictionary implementation to make them more efficient. "Modern Dictionaries by Raymond Hettinger" [1] is a quite interesting and technical talk about these changes, explaining also the change in iteration order IIRC, worth a watch in my opinion! [1] ▶ this video
Raymond Hettinger made an interesting talk about Python's dict (hash table) and how Python's core development team evolved it over time. He's giving the polished version of talk at PyCon this May but if you can't wait for it, here's a rough version: ▶ this video
I think Raymond Hettinger is called out specially here because he did a well known talk called [Modern Dictionaries]( ▶ this video ) where around 32:00 to 35:00 in he makes the quip about how younger developers think they need new data structures to handle new problems, but eventually just end up recreating / rediscovering solutions from the 1960s. “What has been is what will be, and what has been done is what will be done; there is nothing new under the sun.”
The python dict() is already high-quality and high-performance. You're probably not going to be able to do much better than the current state. If you want faster you end up moving your data into an environment that lets you make more assumptions and be more restrictive with your data and operate on it there. It's how numpy, polaris, and pandas work. Everything in Python is a dict, there's no data structure that's been given more attention. ▶ this video