On Tue, 10 May 2011 21:54:30 -0400, Jonathan Crapuchettes
<jcrapuchet...@gmail.com> wrote:
Hey all,
I have been working with a lot of associative arrays of late and been
running into some problems with the built-in implementation. It appears
that very heavy use in an application can cause the garbage collector to
have issues. Most of the time I have found ways around the problems, but
the one that I ran into today has made me wonder if there is a less
error prone/slower implementation of AAs out there for D that doesn't
pound the GC as hard. I have looked at the aa project at dsource and
noticed some discussion on the forums from a little while ago, but I
wasn't sure how up-to-date everything was.
I realize this is very late response, but you can try an alternative map
type in dcollections. There are both HashMap and TreeMap. Please use the
latest d2 branch, as it has recently been updated to work with 64-bit
linux (need to do a beta release).
http://www.dsource.org/projects/dcollections
In most cases, the HashMap actually is faster than the builtin AA.
-Steve