The Read Integer instance is too slow
The current implementation of the Read Integer instance has quadratic complexity and thus performs badly on large inputs. On my system, it takes 65 seconds to perform the following:
read (take 1000000 $ cycle "1234567890") :: Integer
Note that we already provide an ad-hoc instance for Show Integer, so maybe we can do the same for Read Integer.
Trac metadata
Trac field | Value |
---|---|
Version | 7.11 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | ekmett, hvr |
Operating system | |
Architecture |