On Wednesday, 2 December 2020 at 00:08:55 UTC, ddcovery wrote:
On Tuesday, 1 December 2020 at 23:43:31 UTC, Max Haughton wrote:
On Tuesday, 1 December 2020 at 22:49:55 UTC, ddcovery wrote:
Yesterday I really shocked when, comparing one algorithm written in javascript and the equivalent in D, javascript performed better!!!

[...]

Use ldc, rdmd can invoke it for you. DMD's optimizer is not even close to as advanced as a modern JavaScript engine's - that's why we use it for fast build times instead of performance.

Impressive performance increase:

$ ldc2 -O -release  --run sorted.d
# D
1.0M: 810 ms
1.5M: 1324 ms
3.0M: 2783 ms
6.0M: 5727 ms

Thanks Max

I've written a github issue on your repository with flags to get the most out of LLVM.

Reply via email to