[Haskell-cafe] Reading integers

Bertram Felgenhauer bertram.felgenhauer at googlemail.com
Fri Sep 8 09:18:35 EDT 2006


I've commited some small improvements to the readInteger code, which
speed up handling negative numbers and also the compatability wrappers
very slightly.

My last numbers comparing the reads wrappers to the basic readInteger
code turned out to be unfair; apparently ghc managed to share some
of the calculations of these functions somehow. I've changed the
benchmark code to wrap the new functions into NOINLINE helpers, so
that source of errors is eliminated.

Now the reads overhead looks much less scary then before, on the order
of 10% for small integers.



More information about the Haskell-Cafe mailing list