Is there any language that native-compiles faster than D?
Dukc
ajieskola at gmail.com
Wed Aug 26 12:40:48 UTC 2020
On Wednesday, 26 August 2020 at 04:37:06 UTC, ketmar wrote:
> H. S. Teoh wrote:
>
>>> I wonder if anyone in the D community has the expertise to
>>> change
>>> modify or rewrite DMD's backend to be up to be at most 1.5-2x
>>> slower
>>> at normal, non-SIMD tasks, up to a poor version of LuaJIT or
>>> V8 while
>>> retaining the speed.
>>
>> Supposedly Walter is one of the only people who understands
>> the backend
>> well enough to be able to make significant improvements to it.
> that's why there is no reason to "improve" current DMD backend
> at all.
Perhaps we should not be that quick to downplay DMD just because
it does not optimize as heavily as GDC and LDC at max settings. I
may be too theoretical, but I think using only relatively basic
optimizations for release build might be preferable to always
using the most aggressive setting. Why?
Because the program usually spends almost all it's time in tiny
fraction of itself. One has profile where it is and do some
hand-optimization anyway to get a performant program, no matter
what `-O#` is used. It makes sense to use some basic
optimizations, enough to avoid hand-assembly and things like
`foreach(vector; cast(long[])intArray){...}` in the critical
parts. But max-optimizing the whole program, for me, just seems
to bloat binary size and compile times for relatively little
benefit.
Also, one supposedly wants to benchmark the critical parts. With
conservative optimization, the benchmarks are faster to compile,
and supposedly more reliable. There is less surface for
compiler-caused performance regression, and your code is more
likely to stay fast if you decide you need to use size
optimization instead.
More information about the Digitalmars-d
mailing list