200-600x slower Dlang performance with nested foreach loop

Paul Backus snarwin at gmail.com
Wed Jan 27 15:14:39 UTC 2021


On Wednesday, 27 January 2021 at 15:12:32 UTC, Paul Backus wrote:
>
> 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

Correction: the GC would take care of the safety issue, of 
course. I haven't had my morning tea yet, and clearly I'm not 
thinking straight. :)


More information about the Digitalmars-d-learn mailing list