[GHC] #5925: Add inline version of newArray#
GHC
ghc-devs at haskell.org
Sat Mar 8 18:41:56 UTC 2014
#5925: Add inline version of newArray#
-------------------------------------+------------------------------------
Reporter: tibbe | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.6.2
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By: 4258
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by tibbe):
I have something that works. I will post a patch later tonight.
Benchmark: allocating 100,000,000 `MutableArray# ()` of size 16 in a loop.
Best out of three runs for old implementation:
{{{
$ time ./NewArraySlow
real 0m2.741s
user 0m2.696s
sys 0m0.043s
}}}
Best out of three runs for new implementation:
{{{
$ time ./NewArrayNew
real 0m1.490s
user 0m1.449s
sys 0m0.041s
}}}
That's almost 2x faster.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5925#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list