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 map & set/get (long)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-07-25 (09:31)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Bigarray map & set/get (long)
> The problem with this is that sometimes you don't want the discontinuity 
> and inconvenience of calling to C.  Obviously, it'd be nice if we could do 
> everything in ocaml from a simplicity and consistency standpoint, assuming 
> it's not an infinite amount of work to get there.
> There is an important middle ground between "not caring about speed" and 
> "needing the highest end BLAS performance", and since CPUs are making bad 
> code fast faster than they're making good code fast, the middle ground is 
> moving higher up the importance ladder, and getting easier to attain.

Agreed, but in this case (as I mentioned in my earlier post) you'd get
better performance by just using regular float arrays rather than bigarrays.(*)
Thus, I recommend using bigarrays only when interfacing with C or
Fortran numerical code.

- Xavier Leroy

(*) This isn't quite right: on some platforms (PowerPC, Sparc, Mips),
a 1D bigarray can actually be slightly more efficient than a float
array, because of memory alignment properties.  But this isn't true on
the Pentium.
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: