Skip to content

Comment on Beating Decades of Optimized C with 80 Lines of Haskellparent

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.