Re: howto count lines - fast

2017-05-31 Thread Nitram via Digitalmars-d-learn
I am glad to see this participation on this issue :) The hints about trying another compiler and std.mmfile turned out to be very effective. Even this simple code is faster then my systems "wc -l" now: void main() { import std.stdio; writeln(lcs("benchmark.dat")); } size_t

howto count lines - fast

2017-05-30 Thread Nitram via Digitalmars-d-learn
After reading https://dlang.org/blog/2017/05/24/faster-command-line-tools-in-d/ , i was wondering how fast one can do a simple "wc -l" in D. So i made a couple short implementations and found myself confronted with slow results compared to "/usr/bin/wc -l". How would a implementation look