That file repeated 10 times, even: https://github.com/benhoyt/countwords/blob/master/test.sh
firmament: 10
firmament, 10
genesis 10
version 10
Evaluation took:
2.798 seconds of real time
2.813069 seconds of total run time (2.677126 user, 0.135943 system)
100.54% CPU
8,125,595,437 processor cycles
934,110,048 bytes consedI'm also pretty certain the article is benchmarking against the 10x copy file for the actual benchmarks.
See this example command in the article:
time $PROGRAM <kjvbible_x10.txt >/dev/null
So, even if you had the exact same hardware, I'm pretty sure your program would only be a bit faster than the unoptimized C# version. However, it's possible that your machine is a lot slower than what's used in the article, and your program is actually pretty fast -- but without more points of comparison, we just don't know. You haven't run the other benchmark programs on your hardware and posted the results.