Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 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