+++ Edward A Kmett [Oct 28 12 17:08 ]:
> It might be worth hunting for similar low hanging fruit as well.
No doubt a similar approach would work for isLetter, isDigit,
toUpper, toLower, etc.
One thing puzzles me, though. Maybe someone here will have an
explanation. I added a test case to my benchmark for isSpace
*imported* from Data.Char. The imported isSpace benchmarks
much faster (up to 5X) than the isSpace_DataChar, even though the latter has
the same definition as the former. Wren Thronton noticed this too,
and suggests (in
http://community.haskell.org/~wren/bytestring-lexing/test/bench/BenchIsSpace.hs)
that the difference "appears to be something special in how the base
library was compiled," but I have no idea what that could be.
John