[GHC] #10067: The Read Integer instance is too slow

GHC ghc-devs at haskell.org
Fri Aug 7 15:20:34 UTC 2015


#10067: The Read Integer instance is too slow
-------------------------------------+-------------------------------------
        Reporter:  redneb            |                   Owner:
            Type:  feature request   |                  Status:  closed
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Core Libraries    |                 Version:  7.11
      Resolution:  fixed             |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:  Phab:D645
-------------------------------------+-------------------------------------

Comment (by redneb):

 Yes, as I mentioned above, the `Read` instance of `Natural` relies on the
 `Read` instance of `Integer` so we get a speed-up for `Natural` as well.
 Unfortunately, this is not the case for the lexers from `Text.Read.Lex`,
 namely `readIntP`, `readOctP`, `readDecP`, `readHexP`: they only use the
 new algorithm for `Integer` but not for `Natural`.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10067#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list