howto count lines - fast
cym13 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 31 11:01:05 PDT 2017
On Wednesday, 31 May 2017 at 17:23:46 UTC, Ali Çehreli wrote:
> On 05/30/2017 11:50 PM, Daniel Kozak via Digitalmars-d-learn
> wrote:
>
> > How do you compile it? When I use ldc2 -O3 -release
> -mcpu=bdver1 lc.d
> > my code is even faster than wc
>
> My bad: I'm not familiar with ldc's optimization options. (I
> used -O3 but not -release) Now I get the same performance as
> 'wc -l' when I add -release.
>
> Ali
It seems to me that your initial result is more interesting: you
manage to get faster than wc *while keeping bound safety*. At a
time where safety is finally getting the importance it should
always have had showing that you can write fast code without
sacrifiying any of it is important I think.
More information about the Digitalmars-d-learn
mailing list