Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Bigarray access speed
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-16 (11:04)
From: William Chesters <williamc@p...>
Subject: float array alignment; was Re: [Caml-list] Bigarray access speed
malc writes:
 > To get maximal speed of the inner loops data needs to be naturally 
 > aligned. OCaml does nothing to enforce it for non-big arrays. Bigarrays on 
 > the other hand are mmaped(4k on IA32) and you get perfectly aligned data 
 > for free. I was thinking that maybe Array can be extended with
 > make[create]_aligned, for speed/space tradeoff.

I did this once to be able to interface with Fortran libs on Sparc32,
and I still have a patch (against ocaml-2.01) lying around.  It was
actually quite thoroughly tested, but it's probably not very tidy.  The
main gotcha iirc was getting output_value/input_value to preserve
alignment :).
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: