On Wednesday, 27 January 2021 at 14:15:26 UTC, FeepingCreature
wrote:
Associative arrays allocate per entry added?!
https://github.com/dlang/druntime/blob/master/src/rt/aaA.d#L205
Oh God, associative arrays allocate per entry added!
Maybe it's to avoid invalidating the result of `key in aa` when
adding or removing entries? The spec doesn't say anything about
it either way [1], but allowing invalidation would make AAs much
more difficult to use in @safe code.
[1] https://dlang.org/spec/hash-map.html