Doubts about the performance of array concatenation
ddcovery
antoniocabreraperez at gmail.com
Wed Dec 2 00:08:55 UTC 2020
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
More information about the Digitalmars-d-learn
mailing list