DConf 2013 Closing Keynote: Quo Vadis by Andrei Alexandrescu
Steven Schveighoffer
schveiguy at yahoo.com
Sun Jun 30 16:20:47 PDT 2013
On Sun, 30 Jun 2013 15:51:32 -0400, Jonathan M Davis <jmdavisProg at 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
More information about the Digitalmars-d-announce
mailing list