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
Re: single-precision floats, etc.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: single-precision floats, etc.
>From: Chris Hecker <>

>Hi, I'm looking into the feasibility of using Caml for some
>high-performance numerically intensive video game stuff, and I had a
>couple questions:

I'd be worried about the GC pause times.  They're pretty short, but
are they short enough for high-performance video game stuff ?

>Another question, which is not as important, was the size limitation
>on arrays.  The biggest float array one can have is around 699000

Where did you get that number from ?  The maximum size of float arrays
is 2097152 elements on a 32-bit machine, and 9007199254740992 elements
on a 64-bit machine (assuming you have enough memory...)

>Finally, why aren't simple arrays of ints unboxed, like the arrays of
>floats?  Would that be a hard change to make as well?

I can't give a precise answer to this question, but already the
special treatment of float arrays imposes some overhead on all
polymorphic array operations.  I'm not sure how much worse it would
get with a second kind of special arrays.

-- Damien