Associative Arrays max length? 32bit/64bit

sdvcn via Digitalmars-d digitalmars-d at puremagic.com
Sat May 17 03:46:13 PDT 2014


int main(string[] argv)
{
auto flog = File("results.txt", "w");

	size_t[string] bary;

	for(size_t i=0;i<(size_t.max -1);i++)
	{
		bary["Key:" ~  to!(string)(i)] = i;
		flog.write("stop i=" ~text(i));
		flog.seek(0);
		flog.flush();
	}
     return 0;
}

results:
start i=0
stop i=36495998
---------------
start i=0
stop i=36495992
----------------
start i=36495998
stop i=72991099

I guess not see why Overflow.

hash table Collision?



More information about the Digitalmars-d mailing list