Associative array key order
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Aug 23 07:57:49 PDT 2013
On Fri, Aug 23, 2013 at 01:54:27PM +0200, Daniel Kozak wrote:
> https://github.com/Kozzi11/Trash/blob/master/util/orderedaa.d
[...]
Neat!
Is a doubly-linked list really necessary for the hash buckets? You could
save on some memory & improve performance slightly if you use a
singly-linked list for the buckets, but still keep the left/right
pointers for retaining insertion order. It will also simplify your code
a bit.
T
--
If Java had true garbage collection, most programs would delete themselves upon execution. -- Robert Sewell
More information about the Digitalmars-d-learn
mailing list