#4270: Out of memory when compiling Statistics.Quantile
-------------------------------+--------------------------------------------
Reporter: Itkovian | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 7.0.1
Component: Compiler | Version: 6.13
Keywords: Out-of-memory | Testcase: Statistics.Quantile
Blockedby: | Difficulty:
Os: Linux | Blocking:
Architecture: x86_64 (amd64) | Failure: Compile-time crash
-------------------------------+--------------------------------------------
Changes (by rl):
* cc: rl (added)
Comment:
Is the oom problem in `Quantile` caused by this as well?
As to `zipWithM` and other stream functions, optimising them is pointless
as they will always be inlined. If GHC fails to inline them for some
reason, then it really won't matter whether they are optimised or not as
performance will be quite atrocious in any case. This also means that it's
only worth inlining them at the final call site.
There doesn't seem to be an easy way of specifying all this. I wonder,
though, what GHC would do if I rewrote, say, `zipWithM` as a nullary
function:
{{{
zipWithM = \f (Stream stepa sa0 na) (Stream stepb sb0 nb) -> ...
}}}
GHC might realise that it will always be inlined, even in `map zipWithM`,
and could simply leave it alone. I don't think it does that at the moment
and in any case, this is quite ugly. Perhaps we need a new pragma. Simon?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4270#comment:5>
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