[
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: | Doug Bagley <doug@b...> |
| Subject: | Re: [Caml-list] OCaml speed |
Rolf Wester wrote: > Hi, > > I used the array access example from http://www.bagley.org/~doug/shootout/ > to compare c/c++ speed against ocaml. The sources I used are attached below. > Unfortunately I could not confirm the given cpu times which are 0.11 sec for > gcc and 0.13 for ocamlopt. My results on a Compaq Alpha True64 are > 0.05 for cxx, 0.1 for g++ and 0.29 for ocamlopt. Does anybody have an idea > what could be the reason for this inconsistency? Did I do anything wrong? I don't think you are necessarily doing anything "wrong", but you are testing in a manner quite differently from me. Some ideas: - Our architectures are quite different, I'm using an old PII-450Mhz. - I time the programs externally, you time them internally. - I compile the ocaml source with: > ocamlopt -noassert -unsafe -ccopt -O3 ary.ml -o ary.run You apparently compiled with: > ocamlopt -o aa_ml unix.cmxa aa.ml The last one is probably what makes the most difference. Cheers, Doug ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr