Counting Words, but can we go faster?

Added those to countwords/haskell at hs · unhammer/countwords · GitHub (all changed to use a faster toLower, which seems fair since it’ll appear in the next version of Text).

@kalhauge your low-level bytestring loop is the current winner, though not that far ahead of the simple lazy IO (Text) version, which should also lower non-ASCII correctly. Perhaps Profiling using 'late' cost centres (after optimization) could shed some light?

3 Likes