We should deprecate -release
Quirin Schroll
qs.il.paperinik at gmail.com
Wed Jul 17 23:56:44 UTC 2024
On Wednesday, 17 July 2024 at 21:19:31 UTC, H. S. Teoh wrote:
> I know it's not nice to admit that dmd does not generate
> optimal executables. I wish I could say otherwise, but the
> facts are the facts. I've consistently gotten 30% performance
> boosts in my program just by compiling with ldc2 instead of dmd
> (not even with -O2, just plain ldc2 is enough to give you a
> significant boost). With ldc2 -O2, I get about 40% performance
> boost, sometimes up to 50% depending on what the program does.
> If you're trying to win benchmarks, having people use dmd is
> the sure way NOT to win them. You want them to use ldc2,
> period. You do NOT want them to use dmd, except when you're
> trying to compete in the compile-speed category.
If that is true, DMD should focus on development and debugging
experience. The difference between those is small: Essentially,
the `-debug` switch enables `debug` blocks and possibly
sacrifices compile-speed for a possibly better debugging
experience. One would use `-debug` to hunt down a reasonably
concrete bug. One uses plain `dmd` for feature development, which
optimizes compile-speed. Even if DMD only had the fastest Code →
Executable, it has its niche. If it can additionally provide a
great debugging experience, even better. But we, the D community,
must be honest with ourselves and not waste time on a lost cause,
such as getting DMD close to LDC (or GDC, i.d.k. how fast GDC’s
optimized executables are) in terms of optimizing for fast
executables.
Free software compilers for the same language may seem like
competition, but they’re more like members of a team with
similar, but different-priority roles.
More information about the Digitalmars-d
mailing list