#6110: Data.Vector.Unboxed performance regression of 7.4.1 relative to 7.0.4
----------------------------------------------+-----------------------------
Reporter: mdgabriel | Owner: pcapriotti
Type: bug | Status: infoneeded
Priority: high | Milestone: 7.4.3
Component: Compiler | Version: 7.4.1
Keywords: Vector Performance Regression | Os: Linux
Architecture: x86 | Failure: Runtime
performance bug
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: #6111 |
----------------------------------------------+-----------------------------
Comment(by mdgabriel):
I too am using in all cases vector 0.9.1. I also carefully rebuilt both
7.0.4 and 7.4.1 with the appropriate Haskell platforms and kept logs to be
absolutely sure that I have proper builds.
I have profiling data and GC data if you still want it, but given the
previous entry and given #6111, I replaced
{{{
v = U.generate cnt (\i -> fromIntegral i :: Double)
}}}
with
{{{
v = U.generate cnt (\i -> fromIntegral i :: Int)
}}}
and obtained the following timings
{{{
GHC 7.0.4 time: 1000000000 4.08
GHC 7.4.1 time: 1000000000 5.01
}}}
Needless to say, the results are worthless due to integer overflow but
it clearly points to fromIntegral as possessing the problem.
I then replaced
{{{
v = U.generate cnt (\i -> fromIntegral i :: Double)
}}}
with
{{{
v = U.generate cnt (\i -> fromIntegral i :: Int64)
}}}
and obtained the following timings
{{{
GHC 7.0.4 time: 1000000000 12.82
GHC 7.4.1 time: 1000000000 12.12
}}}
The problem clearly appears to be the coercion from Int to Double via
fromIntegral and it clearly appears to be my environment.
Is this coercion code in GHC or is it a library call or what changed
between 7.0.4 and 7.4.1?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6110#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs