www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Study on hash associative arrays

reply "bearophile" <bearophileHUGS lycos.com> writes:
Through Reddit I've found posts about hash-based associative 
arrays:

http://bannalia.blogspot.it/2013/10/implementation-of-c-unordered.html
http://bannalia.blogspot.it/2014/01/a-better-hash-table.html

Those little images like this one are excellent at explaining in 
a short space the basic structure of a data structure:

http://4.bp.blogspot.com/-jh0W64vfSt8/UsmZMel5gQI/AAAAAAAAAvU/k6ThAu4mL2M/s400/boost.multiindex_1.png

I think the online documentation should have images like this one 
for AAs, and other data structures.

Do you know what's the structure of the D built-in AAs, and are 
the ideas in those two posts useful to improve D AAs?

Bye,
bearophile
Jan 09 2014
next sibling parent "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= writes:
On Thursday, 9 January 2014 at 10:48:22 UTC, bearophile wrote:
 Through Reddit I've found posts about hash-based associative 
 arrays:

 http://bannalia.blogspot.it/2013/10/implementation-of-c-unordered.html
I think the worry that a hash function should throw an exception is a bit over the top? Why would you do that?
Jan 09 2014
prev sibling parent Benjamin Thaut <code benjamin-thaut.de> writes:
Am 09.01.2014 11:48, schrieb bearophile:
 Through Reddit I've found posts about hash-based associative arrays:

 http://bannalia.blogspot.it/2013/10/implementation-of-c-unordered.html
 http://bannalia.blogspot.it/2014/01/a-better-hash-table.html

 Those little images like this one are excellent at explaining in a short
 space the basic structure of a data structure:

 http://4.bp.blogspot.com/-jh0W64vfSt8/UsmZMel5gQI/AAAAAAAAAvU/k6ThAu4mL2M/s400/boost.multiindex_1.png


 I think the online documentation should have images like this one for
 AAs, and other data structures.

 Do you know what's the structure of the D built-in AAs, and are the
 ideas in those two posts useful to improve D AAs?

 Bye,
 bearophile
I recently did a comparison of 3 different hashmap implementations in the following thread: http://forum.dlang.org/thread/dfyowpjhdaemhxhepfmk forum.dlang.org?page=4#post-l9nbqj:242qlg:241:40digitalmars.com
Jan 09 2014