Faster Array#/MutableArray# copies

Max Bolingbroke batterseapower at
Fri Feb 18 09:10:44 CET 2011

On 18 February 2011 01:18, Johan Tibell <johan.tibell at> wrote:
> C compilers, like gcc, go to great lengths making memcpy fast and I
> was thinking that we might be able to steal a trick or two from them.
> I'd like some feedback on these ideas:

It seems like a sufficient solution for your needs would be for us to
use the LTO support in LLVM to inline across module boundaries - in
particular to inline primop implementations into their call sites.
LLVM would then probably deal with unrolling small loops with
statically known bounds.

I don't think this would require a major change to GHC, though LTO
would only work with the Gold linker (which only supports ELF) at the
moment :-(


More information about the Glasgow-haskell-users mailing list