On Wednesday, 2 December 2020 at 06:31:49 UTC, H. S. Teoh wrote:
On Tue, Dec 01, 2020 at 10:49:55PM +0000, ddcovery via Digitalmars-d-learn wrote:
Yesterday I really shocked when, comparing one algorithm written in javascript and the equivalent in D, javascript performed better!!!
[...]
With 1 million Double numbers (generated randomly):
  Javascript (node 12): 1507 ms
  DMD: 2166 ms

With 6 million Double numbers
  Javascript (node 12): 10776 ms
  DMD: 15243 ms

Yeah, when it comes to performance-related things, don't bother with DMD. Its optimizer is known to have limitations, and IME consistently produces code that underperforms LDC-generated code by about 20-30%, sometimes even as high as 40%.

For performance comparisons, always use GDC/LDC.


T

After applying adecuate parametrization (thanks to Max Haughton for the tips), LDC generated code is running almost 3 times faster than DMD one!!!


Reply via email to