News for hackers. Stuff that matters.
Re:Destroying C with 20 lines of Haskell: wc by mkup on Tuesday February 04, 2020 @08:12AM (#22235106)
But how would Haskell version of wc compare with C version of wc running with LC_ALL=C environment variable? UTF-8 locale is much slower than C locale in coreutils, it's a well-known fact, and their Haskell version of wc is already using fixed 8-bit characters.
Re:Destroying C with 20 lines of Haskell: wc by 0xd34df00d on Tuesday February 04, 2020 @08:55AM (#22235504)
wc was actually slower with LC_ALL=C as opposed to ru_RU.UTF-8 that my system normally runs with (about 10 s against 7.2 s).

Which actually raises a good question of whether I should have been comparing with that one — but that'd probably raise more questions and lead to more people accusing me of cheating in favour of Haskell.

Re:Destroying C with 20 lines of Haskell: wc by zzzcpan on Tuesday February 04, 2020 @09:29AM (#22235864)
The only way I can think of this could be true is if you made a mistake in setting an env var.
Re:Destroying C with 20 lines of Haskell: wc by classified on Tuesday February 04, 2020 @09:42AM (#22236014)
Well, counting characters is obviously different from counting bytes when the characters are UTF-8 encoded, or UTF-32.