On Thursday, 4 April 2019 at 10:31:43 UTC, Julian wrote:
On Thursday, 4 April 2019 at 09:57:26 UTC, rikki cattermole wrote:
If you need performance use ldc not dmd (assumed).

LLVM has many factors better code optimizes than dmd does.

Thanks! I already had dmd installed from a brief look at D a long time ago, so I missed the details at https://dlang.org/download.html

ldc2 -O3 does a lot better, but the result is still 30x slower
without PCRE.

Try:
ldc2 -O3 -release -flto=thin -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -enable-inlining

This will improve inlining and optimization across the runtime library boundaries. This can help in certain types of code.

Reply via email to