[GHC] #12665: Make Read instances for Integral types faster, and make them fail fast
GHC
ghc-devs at haskell.org
Fri Nov 11 04:50:41 UTC 2016
#12665: Make Read instances for Integral types faster, and make them fail fast
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: dfeuer
Type: feature request | Status: new
Priority: high | Milestone: 8.2.1
Component: Core Libraries | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"bef7e784d037f720697a215b9e21f13b385e6d3e/ghc" bef7e78/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="bef7e784d037f720697a215b9e21f13b385e6d3e"
Read parentheses better
Instead of pulling a token and looking for `'('` or `')'`,
just look for the character itself. This prevents us from
lexing every single item twice, once to see if it's a
left parenthesis and once to actually parse it.
Partially fixes #12665
Make parens faster more aggressively
* Strip spaces before parsing, so we never have to strip
the same spaces twice.
* String parsers together manually, to try to avoid unnecessary closure
creation.
Test Plan: Validate
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2630
GHC Trac Issues: #12665
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12665#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list