Comment on Beating Decades of Optimized C with 80 Lines of HaskellparentComments−unhammer6yI see calls to mbrtowc, which means they support non-utf-8 locales, but I'd love to know, given utf-8, what the semantic difference would be. Are there utf-8 inputs for which the Haskell and C `wc -m` give different answers?−olliej6yYou are correct - I was wrong about utf8, it is just doing a more correct decode than the inline trivial test that the Haskell version does.
Comments
I see calls to mbrtowc, which means they support non-utf-8 locales, but I'd love to know, given utf-8, what the semantic difference would be. Are there utf-8 inputs for which the Haskell and C `wc -m` give different answers?
You are correct - I was wrong about utf8, it is just doing a more correct decode than the inline trivial test that the Haskell version does.