khash associative array / hash map / hash set

ikod igor.khasilev at gmail.com
Mon Aug 24 05:51:59 UTC 2020


On Monday, 24 August 2020 at 01:39:26 UTC, James Blachly wrote:
> OH, I almost forgot the best part. It is crazy fast.
>
> https://attractivechaos.wordpress.com/2018/01/13/revisiting-hash-table-performance/
> https://attractivechaos.wordpress.com/2019/12/28/deletion-from-hash-tables-without-tombstones/
>
> My naive benchmark shows -- compared to emsi_containers.HashMap 
> -- 30% faster inserts, 80% faster serial retrieval and 70% 
> faster random retrieval. Perhaps I am doing something wrong?
>
> James

Thanks, nice job!

You also may want to compare performance with 
https://github.com/ikod/ikod-containers, just add dependency from 
ikod-containers, then:

import ikod.containers;

and use ikod.containers.hashmap.HashMap as alias for container. I 
squeezed everything I was able from the open-addressing hash map.


More information about the Digitalmars-d-announce mailing list