diff options
author | Raymond Hettinger <python@rcn.com> | 2013-09-15 21:57:15 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-09-15 21:57:15 (GMT) |
commit | 8408dc581e2baaa306b57f14486cfa013fd68c68 (patch) | |
tree | da3f4c127dbdd665422f11b5ed1c661f3b8dabca /Doc/whatsnew | |
parent | e6d35dba3cee44aa2fc64b7866f0b3327151a7c4 (diff) | |
download | cpython-8408dc581e2baaa306b57f14486cfa013fd68c68.zip cpython-8408dc581e2baaa306b57f14486cfa013fd68c68.tar.gz cpython-8408dc581e2baaa306b57f14486cfa013fd68c68.tar.bz2 |
Issue 18771: Make it possible to set the number linear probes at compile-time.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.4.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 0749f03..e91ce2a 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -444,8 +444,15 @@ Major performance enhancements have been added: * The UTF-32 decoder is now 3x to 4x faster. * The cost of hash collisions for sets is now reduced. Each hash table - probe now checks a second key/hash pair for each cache line retrieved. - This exploits cache locality to make collision resolution less expensive. + probe now checks a series of consecutive, adjacent key/hash pairs before + continuing to make random probes through the hash table. This exploits + cache locality to make collision resolution less expensive. + + The collision resolution scheme can be described as a hybrid of linear + probing and open addressing. The number of additional linear probes + defaults to nine. This can be changed at compile-time by defining + LINEAR_PROBES to be any value. Set LINEAR_PROBES=0 to turn-off + linear probing entirely. (Contributed by Raymond Hettinger in :issue"`18771`.) |