[Haskell-cafe] Fast Integer Input
200901104 at daiict.ac.in
200901104 at daiict.ac.in
Mon Aug 23 09:47:32 EDT 2010
I need a function which has fast conversion from Bytestring to Integer.
I am currently using this:
import qualified Data.ByteString.Lazy.Char8 as BS
readInteger :: BS.ByteString -> Integer
readInteger x =
case BS.readInteger x of Just (i,_) -> i
Are there faster implementations? This function takes 1.8 seconds to
convert 2000 integers of length 10^13000. I need it to be smaller that
0.5 sec. Is it possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100823/9b0218db/attachment.html
More information about the Haskell-Cafe
mailing list