2 ms·
Although cPython and Redis hashtables are both implemented in C. cPython's open addressing based hashtable[1] is far superior to the simple chaining based hasht
by woadwarrior01 6y ago
Although cPython and Redis hashtables are both implemented in C. cPython's open addressing based hashtable[1] is far superior to the simple chaining based hashtable[2] in Redis. Python's performance is heavily dependent on the performance of its hash table implementation that it has been optimized over and over decades now.
[1]: https://github.com/python/cpython/blob/master/Objects/dictobject.c https://github.com/python/cpython/blob/master/Objects/dictob...
[2]: https://github.com/redis/redis/blob/unstable/src/dict.c https://github.com/redis/redis/blob/unstable/src/dict.c