Missed opportunity for let-no-esape
|Reported by:||claus||Owned by:||simonpj|
|Keywords:||Cc:||Bulat.Ziganshin@…, claus.reinke@…, daniel.is.fischer@…, sveina@…|
|Type of failure:||Runtime performance bug||Test Case:|
|Related Tickets:||Differential Rev(s):|
readArray/writeArray call GHC.Arr.index, which seems inexplicably slow for 2d arrays. inexplicably, because simply copying the default implementation of index from GHC.Arr into the local module can speed things up considerably.
originally raised in this thread: http://www.haskell.org/pipermail/haskell-cafe/2007-March/023394.html
shortened example or matrix/vector-multiplication attached. comment out the first line of myindex to use the local copy. this results in a speedup from 20s to 13s (time ./Index 100000) on my system, not to mention the difference in space usage (a factor of 1000 in allocation, according to +RTS -sstderr..).
Change History (29)
comment:14 Changed 7 years ago by
|Cc:||Bulat.Ziganshin@… claus.reinke@… daniel.is.fischer@… added; Bulat.Ziganshin@… removed|
comment:17 Changed 7 years ago by
|Summary:||indexing 2d arrays is slow and leaky. why? → Missed opportunity for let-no-esape|