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 OAA28113; Tue, 26 Nov 2002 14:22:30 +0100 (MET) 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 OAA25786 for ; Tue, 26 Nov 2002 14:22:29 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gAQDMNX05585; Tue, 26 Nov 2002 14:22:23 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA28075; Tue, 26 Nov 2002 14:22:23 +0100 (MET) From: Pierre Weis Message-Id: <200211261322.OAA28075@pauillac.inria.fr> Subject: Re: [Caml-list] Some clarifications to the language shootout page In-Reply-To: <3DE34238.9050804@kfunigraz.ac.at> from Siegfried Gonzi at "Nov 26, 102 10:43:20 am" To: siegfried.gonzi@kfunigraz.ac.at (Siegfried Gonzi) Date: Tue, 26 Nov 2002 14:22:23 +0100 (MET) Cc: caml-list@inria.fr, siegfried.gonzi@kfunigraz.ac.at X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi list, Here is the conclusion of our mail exchange with Manuel: > ==== > Just one more thing, I have changed the Scheme code a very little bit to > > make it more similar to the Caml code. That is, I have changed the > construction of the row vectors. The original initialization > > (mx (make-vector rows 0.0)) > > was breaking the CFA because mx what not > correctly typed vector of vector of double. I have replaced it with: > > (mx (make-vector rows (make-vector 0 0.0))) > > Then, you should compile with: > > bigloo -v2 -Obench foo.scm -copt "-O3 -fomit-frame-pointer" > > On my machine with this two modifications I see an improvement of about 17%. > It is still insufficient to defeat Ocaml but we are getting a little closer [:-)] > > -- > Manuel Hi Manuel, As you should have noticed, I did not try to optimize anything in the Caml code: I just tried a litteral translation from Scheme to Caml. In effect, the original Caml code was not optimally clear (difficult to read and difficult to compile) and was compared to a (relatively) clear Scheme code. Mere translation of the Scheme code to Caml just improves the runtime by a factor of 2 or so. As you surely know already, I was obliged to change the initialization, since (mx (make-vector rows 0.0)) is ill-typed in Caml. This is amazing that now this well-typed Caml version, once translated back to Scheme, improves the original Scheme version! I think that this proves, once more, that our languages are not as different as people think they are :) Cheers, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/ ------------------- 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