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: [Caml-list] Question on writing efficient Ocaml.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-12-28 (17:00)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Question on writing efficient Ocaml.
On Thu, Dec 28, 2006 at 04:03:55PM +0000, Ian Oversby wrote:
> Does this mean that unboxing is inefficient in OCaml?  I've written an 
> alternative version of the C++ that returns NULL instead of out of bound 
> values which was close to the same speed so it would be a little 
> disappointing if I couldn't achieve something similar in OCaml with Some / 
> None.

It's not so much that boxing/unboxing is inefficient in OCaml, but
rather that ocamlopt compiles exactly what you ask it to.  If you ask
it to use a box, it uses a box!  (Well, mostly ...)

in particular the note about Gallium.


Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology -
Internet Marketing and AdWords courses - - NEW!
Merjis blog - - NEW!