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: -- (:)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] Bigarray map & set/get (long)

>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 
>Thus, I recommend using bigarrays only when interfacing with C or
>Fortran numerical code.

Sure, but what a pain if you want to do both (say, do some math on an array 
of floats in caml and then pass them to a graphics api as vertices).  Or, 
you start with an algorithm in caml and then slowly need to move parts of 
it to C/asm.  It would clearly be better if there was a single uniform way 
to do things that was "optimal" (or close) for both situations.  It seems 
that the bigarray stuff is not far off from this, as I said.  There seems 
to be some nice low hanging fruit that could make a big difference in the 
native compiler with bigarrays.

Anyway, I'll look into it again and do some experiments at some point and 
see what I come up with.  I'd much rather have the caml team working on 
harder more higher level stuff that I'd have no prayer of being able to 
do[*], anyway.


[*] My current list of needed/wanted language features:

1. operator overloading/generics for making math less ugly and painful
2. module recursion
3. views for pattern matching abstract data types

I added views to my want-list relatively recently (6 months ago?) as I 
started trying to do more interesting stuff.  I can't believe the conflict 
between wanting to pattern match like you're supposed to in ml and wanting 
to abstract data types like you're supposed to in ml doesn't get more 
attention in the functional programming community.  It seems like a glaring 
problem, but maybe I'm missing something.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: