Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners