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: | 2006-12-28 (22:28) |
From: | Jon Harrop <jon@f...> |
Subject: | Re: [Caml-list] Question on writing efficient Ocaml. |
On Thursday 28 December 2006 16:03, Ian Oversby wrote: > Does this mean that unboxing is inefficient in OCaml? Yes. However, you've had to go out of your way to make the OCaml slow in this case. > 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. You would be better off focusing on higher-level optimisations, like algorithmic optimisations. > >You might want to compare with this solution of the queens problem in > >ocaml: > > http://caml.inria.fr/pub/old_caml_site/Examples/oc/basics/queens.ml > > I've written a queens solver along the same lines which is much faster than > my other example as it makes many fewer calls and constructs fewer (and > simpler) boards. Why are you optimising this version if you already have a faster one? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists