From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA05186; Wed, 10 Jul 2002 15:12:38 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA05182 for ; Wed, 10 Jul 2002 15:12:37 +0200 (MET DST) Received: from mailhost.tni.fr (firewall.tni.fr [195.25.255.61]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6ADCan24908 for ; Wed, 10 Jul 2002 15:12:37 +0200 (MET DST) Received: from groscool.tni.fr ([195.25.255.1]) by mailhost.tni.fr (Netscape Messaging Server 3.62) with SMTP id 2816; Wed, 10 Jul 2002 15:12:18 +0200 Received: from 192.168.7.72 by groscool.tni.fr (InterScan E-Mail VirusWall NT); Wed, 10 Jul 2002 15:12:17 +0200 (Paris, Madrid (heure d'été)) Message-ID: <3D2C3296.126C83F0@tni.fr> Date: Wed, 10 Jul 2002 15:11:50 +0200 From: "sebastien FURIC" X-Mailer: Mozilla 4.7 [fr] (WinNT; I) X-Accept-Language: fr MIME-Version: 1.0 To: Dave Mason CC: caml-list@inria.fr Subject: Re: [Caml-list] productivity improvement References: <200207101158.g6ABwVm25582@sarg.ryerson.ca> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Dave Mason a écrit : > > 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 Dave, My strange user times are obtained under Cygwin. I forgot to mention I did the test under Windows NT 4.0 (Intel 200 MHz, 128 MB RAM) using the last version of Cygwin (hence the last version of time.exe!) and Objective Caml 3.04. There was no swapping, so sys time is a good approximation of the time spent by the program to solve the problem. It is not very surprising to beat O'Caml using a language that is tuned to perform lazy computations natively when the problem to solve is lazy! More surprising is the fact that the lazy program outperforms a strict one (written in an imperative style). Cheers, Sebastien. ------------------- 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