Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] productivity improvement
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Mason <dmason@s...>
Subject: Re: [Caml-list] productivity improvement
Further to my comment on benchmarking...

I just ran your ocaml lazy version, and got:

real	14m15.124s
user	13m26.769s
sys	0m2.510s

This on a 533MHz Alpha with 3/4GB of RAM.  There is no swapping.

Even when I compile it with the optimizing compiler, I get:

real	9m8.763s
user	8m51.626s
sys	0m1.667s

Based on the (small) differences between the byte-code version and the
optimized version, I hypothesize that a large amount of that time is spent
in garbage collection.  This looks like a perfect garbage-collector
stress test!

My guess for why Clean does well suggests a garbage collector better
tuned to the problem, but more importantly, a much more efficient
handling of laziness.  I suspect you'd see similar results for this
problem in Haskell.  Of course that doesn't mean Clean or Haskell will
beat OCaml at most, or even many, other benchmarks.  But when laziness
is inherent in a solution, expect lazy languages to do much better
than eager languages.

../Dave
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners