English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2006-12-28 (11:42)
From: Ian Oversby <oversby@h...>
Subject: Question on writing efficient Ocaml.

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

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:


I compiled the Ocaml with the following command:

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

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

Thanks very much,


MSN Hotmail is evolving – check out the new Windows Live Mail