#3586: Initialisation of unboxed arrays is too slow
-----------------------------------------+----------------------------------
Reporter: simonpj | Owner:
Type: run-time performance bug | Status: new
Priority: high | Milestone: 6.12.2
Component: libraries (other) | Version: 6.10.4
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
-----------------------------------------+----------------------------------
Comment (by simonpj):
Replying to [comment:13 int-e]:
> On to more serious matters - the explicitely inlined worker trick works
for ghc 6.10.4, but is not sufficient for the 6.12 RC, so that will need a
different fix. One idea that works is to add
> {{{
> newArray = newArrayImpl
> }}}
> to all {{{MArray (STUArray ...) ...}}} instances. Of course getting
inlining for default methods to work would be preferable. In fact, for
default method it would be nice to have a special form of the SPECIALIZE
pragma as well, one that duplicates the definition for all instances and
optimizes it in that context.
There's an underlying problem, which is the fragility of inlining of
default methods. I'm in the midst of fixing that (the long-awaited INLINE
patch), so I propose not to contort the libraries meanwhile. I'll ping
when I commit the patch so that you can check that it does improve
matters.
The only downside is that this perf boost won't get into 6.12, but I think
it's too bad.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3586#comment:18>
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