On Sun, 30 Jun 2013 15:51:32 -0400, Jonathan M Davis <jmdavisp...@gmx.com> wrote:

On Sunday, June 30, 2013 21:05:41 CJS wrote:
In the talk Andrei seems to mentions that D's associative arrays
are lacking in performance somehow. I'm very new to D, but it's
not obvious to me what the shortcoming is. I assume it's that for
some reason it's hard to specialize associative arrays to specfic
types to give increased performance in specfic cases, but I'm
unclear why that would be difficult. Could someone please
elaborate?

There's one implementation, and you can't swap it out, whereas different use cases may perform better with different implementations. On top of that, the
current implementation is rather buggy and fragile, but that's an
implementation issue rather than an inherent one.

No, the main issue is the current one is runtime-only, and so simple function calls such as toHash and opCmp cannot be inlined.

You absolutely can change implementations (Walter did a few years ago from tree-based collision resolution to linked-list based). What you can't do is switch to a fully generated AA, or change the compiler-expected API.

-Steve

Reply via email to