[GHC] #10720: New GHC fails to specialize imported function
GHC
ghc-devs at haskell.org
Sat Aug 1 01:40:12 UTC 2015
#10720: New GHC fails to specialize imported function
-------------------------------------+-------------------------------------
Reporter: wyager | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Keywords: | Operating System: MacOS X
performance, inline, specialize |
Architecture: x86_64 | Type of failure: Runtime
(amd64) | performance bug
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
I just installed the new Haskell platform for OS X.
It seems to have caused a major performance regression for a program I'm
working on, making it well over 25x slower.
The culprit appears to be that the new GHC (7.10.2) fails to specialize an
imported function. If I manually add a SPECIALIZE pragma, performance goes
back to around what it used to be.
The code in question is located at https://github.com/wyager/HNet .
As it stands, the code takes about 30 seconds to run on my machine. With
the previous haskell-platform, it only took about .9 seconds.
If I modify Operations.hs and uncomment the SPECIALIZE pragma, runtime
goes down to about 1.1 seconds (still slower for some reason, but not
awful).
To test, compile with -O2 (as the program makes heavy use of Data.Vector,
which requires -fspec-constr for performance).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10720>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list