Faster Array#/MutableArray# copies

Tyson Whitehead twhitehead at gmail.com
Fri Feb 18 23:34:51 CET 2011


On February 17, 2011 20:18:11 Johan Tibell wrote:
>  * Can we use SSE instructions?
> 
>  * Can we get the C memcpy code inlined into the C-- source (crazy, I
> know). If so we could perhaps benefit directly from optimizations in
> libc.

From the standpoint of numerical code, it would be very nice to get some 
vector .  Perhaps this would also give a natural expression of memcpy.

In the spirit of the common "infinite" register file assumption, I've always 
imagined idealized arbitrary-length vector types/operations at the C-- level 
(mapped to reality via chunking it over fixed length vector instructions).

I see this is LLVM supports arbitrary length vectors as a first class type

http://llvm.org/docs/LangRef.html#t_vector
http://llvm.org/docs/LangRef.html#i_add

Looking at the C-- specification (section 2.4 -- page 10)

http://www.cminusminus.org/extern/man2.pdf

it seems this may not be such a good fit as it considers everything as fixed-
size bit collections (bits8, bits16, etc.) and booleans (bool).  Presumably 
memory orientated primitive instructions are also out as they break the strict 
load/store architecture.  Has anyone though of how to do this?

Some half baked suggestions

 - perhaps it should be fixed-size bit collections with repetition, or
 - built in primitives for instructions composition (i.e., a map operation)?

Cheers!  -Tyson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20110218/9381f7e0/attachment.pgp>


More information about the Glasgow-haskell-users mailing list