Browse thread
Re: [Caml-list] Question on writing efficient Ocaml.
-
Ian Oversby
- Richard Jones
- Jon Harrop
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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 ...) See: http://caml.inria.fr/pub/old_caml_site/ocaml/numerical.html in particular the note about Gallium. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Internet Marketing and AdWords courses - http://merjis.com/courses - NEW! Merjis blog - http://blog.merjis.com - NEW!