[GHC] #2902: Example where ghc 6.10.1 fails to optimize recursive
instance function calls
GHC
trac at galois.com
Mon Dec 29 17:35:27 EST 2008
#2902: Example where ghc 6.10.1 fails to optimize recursive instance function
calls
-------------------------------------+--------------------------------------
Reporter: Syzygies | Owner:
Type: run-time performance bug | Status: new
Priority: normal | Component: Compiler
Version: 6.10.1 | Severity: normal
Keywords: class instance | Testcase:
Os: MacOS X | Architecture: x86_64 (amd64)
-------------------------------------+--------------------------------------
Using ghc 6.10.1, I get over a 3x performance boost on the attached toy
example, by moving instance function definitions out of the instance
declaration, so that recursive calls avoid the class dictionary.
According to SPJ, ghc 6.10.1 is supposed to perform this optimization
automatically. I am reporting it as a bug at his request, following a
discussion on the glasgow-haskell-users at haskell.org list.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2902>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list