git.iko.soy/typeable/attoparsec
on master help sign in
Improve number parsing performance, surprinsgly enough
a25ec6fBryan O'Sullivan
Data/Attoparsec/Char8.hs+3−3
@@ -457,7 +457,7 @@ floaty f = do
457 else if power == 0
457 else if power == 0
458 then f real fraction (10 ^ fracDigits)
458 then f real fraction (10 ^ fracDigits)
459 else f real fraction (10 ^ fracDigits) * (10 ^^ power)
459 else f real fraction (10 ^ fracDigits) * (10 ^^ power)
460− return $! if sign == plus
460+ return $ if sign == plus
461− then n
461+ then n
462− else -n
462+ else -n
463
463