#4979: IO performance regression in 7.0.2
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
If you benchmark `spectral/sphere` you'll see a 25% increase in allocation
between 7.0.1 and 7.0.2. I spent quite a while wondering what was going
on, but I think I know now: the I/O library has changed. In particular,
in 7.0.2 `GHC.IO.Handle.Internals` has a function `writeCharBuffer` that
doesn't exist in 7.0.1; and this function is indirectly responsible for
the extra allocation.
In a bit more detail,
* The extra allocation actually happens in
`GHC.IO.Encoding.Iconv.mkTextEncoding4`.
* This function is (indirectly) packaged into the first field of a
`BufferCodec` structure.
* This structure is unpacked, and the first field is called, in
`GHC.IO.Handle.Internals.$wa2`.
* And that function in turn is the worker for `writeCharBuffer`.
Beyond this I cannot say. Maybe this is a good change and the extra work
is necessary. Maybe not. But that is where the regression comes from.
It'd be good to check.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4979>
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