Re:Advanced techniques to implement fast hash tables
by notatcomputer68 on Tuesday October 23, 2018 @02:07PM
(#18285834)
Nit: You should implement quadratic probing with triangular numbers by addition for a slight speedup. I.e. x+= i, rather than x = ... × ...
[ Parent
| on HN ]
Re:Advanced techniques to implement fast hash tables
by attractivechaos on Tuesday October 23, 2018 @09:57PM
(#18289081)
Of course. Notable libraries implementing quadratic probing all use addition instead of multiplication. The example in the blog post is just for demonstration purpose.
Re:Advanced techniques to implement fast hash tables
by abhishekjha on Wednesday October 24, 2018 @02:23AM
(#18290131)
>addition instead of multiplication
What is the advantage of this?
Re:Advanced techniques to implement fast hash tables
by amelius on Wednesday October 24, 2018 @02:38AM
(#18290177)
Addition being cheaper than multiplication on many CPUs?