Version française
Home     About     Download     Resources     Contact us    
Browse thread
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: -- (:)
From: Ian Oversby <oversby@h...>
Subject: Question on writing efficient Ocaml.
Hi,

Apologies if this is the wrong forum in which to ask this question.  Is 
there anywhere else more
suitable?

I've written some Ocaml code to solve the problem of placing 8 queens on a 
board so that none of them attack each-other.  I've also written a C++ 
equivalent which is running much more quickly than the Ocaml.  I assume I've 
made some basic errors with the Ocaml - does anyone have any suggestions as 
to what?

The code is available here:

http://curiousprogrammer.wordpress.com/2006/12/22/speed-comparison-plt-scheme-ocaml-and-c/

I compiled the Ocaml with the following command:

ocamlopt -noassert -unsafe -ccopt -O3 -ccopt -fomit-frame-pointer q.ml -o 
q.exe

This is running on Windows using the MinGW build of Ocaml.

Thanks very much,

Ian

_________________________________________________________________
MSN Hotmail is evolving – check out the new Windows Live Mail 
http://ideas.live.com