Another performance problem
bearophile
bearophileHUGS at lycos.com
Mon Dec 23 23:39:13 PST 2013
David Nadlinger:
> Turns out that this is actually a DMD issue:
> http://d.puremagic.com/issues/show_bug.cgi?id=4419
>
> You might want to watch out for this trap in the future (or
> annoy people to fix it in the frontend, of course).
I don't fully understand.
I didn't know about issue 4419, it looks like an ugly bug.
The same code from the rosettacode was compiled with both ldc2
and dmd, so if there's a front-end bug it should hit both
compilers.
Also here the performance difference I have seen is so large
(20+?) that I don't think thread local bugs could be enough to
justify it.
The last version of the code I put on Rosettcode can't be
compiled with the LDC2 I have because it uses a recent bug fix
(it uses the .ptr of a zero length field, that until now was
always null), but the Wiki site keeps all the older versions of
the page. So I have used the precedent version of the D code,
with and without swapping static and __gshared. And the code
compiled with dmd is exactly the same performance as before, and
the ldc2 code is still as slow as before in both cases.
So I think Issue 4419 is not the cause of this problem, unless
there's something I don't understand still.
Bye,
bearophile
More information about the digitalmars-d-ldc
mailing list