Poor regex performance?
Stefan Koch
uplink.coder at googlemail.com
Thu Apr 4 12:44:13 UTC 2019
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.
You need to disable the GC.
by importing core.memory : GC;
and calling GC.Disable();
the next thing is to avoid the .idup and cast to string instead.
More information about the Digitalmars-d-learn
mailing list