|
|
|
|
|
by hnlmorg
2330 days ago
|
|
The github repo description is equally distasteful too: > wc implemented in Haskell (significantly faster than GNU coreutils version — oops I did it again For reference, I'm referring to the "oops I did it again" part. It's really hard to take that comment as "honours go to GHC authors". Also, I suggest you try running the GNU wc with unicode turned off because unicode is computationally expensive and you're deliberately disabling unicode support in your own code anyway. I appreciate you said you'd add in the edge cases that GNU does in your next blog post but disabling unicode in GNU for this benchmark would show good faith that you're at least trying to compare like for like. And if GHC still out performs then you can at least legitimately say: > My code outperforms GNU for non-unicode strings Which currently you cannot because your claim is based on incorrect benchmarks. |
|
Was overly excited when I created the repo after obtaining the first results. Childish indeed, thanks for reminding, fixed.
> Also, I suggest you try running the GNU wc with unicode turned off because unicode is computationally expensive and you're deliberately disabling unicode support in your own code anyway.
I tried running wc as `LC_ALL=C wc file.txt`, and it (surprisingly for me) resulted in worse run time for wc (my default locale is ru_RU.UTF-8 for comparison). This reproduced on two machines of mine and also on a machine of a friend of mine who also gave my code a shot.
My bad for omitting this in the post, I'll update it accordingly.