Why is D significantly slower than C# in this instance?

H. S. Teoh hsteoh at qfbox.info
Mon Apr 10 22:00:40 UTC 2023


On Mon, Apr 10, 2023 at 09:46:25PM +0000, Artjom via Digitalmars-d wrote:
[...]
> Sorry, accidentaly pasted solveDynamic() insted of solveBruteForce(),
> it's solveBruteForce() in the code though.
> Im using DMD and compile like "dmd .\source\app.d .\classes\solver.d"

1) You're compiling without optimization (-O), so performance is not
guaranteed to be good.

2) For anything where performance is important, don't use DMD. Instead,
use `gdc -O3` or `ldc2 -O2`.


T

-- 
What's the difference between a 4D tube and an overweight Dutchman?  One is a hollow spherinder, and the other is a spherical Hollander.


More information about the Digitalmars-d mailing list