From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA19667 for caml-redistribution; Thu, 7 Oct 1999 17:49:22 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA18579 for ; Thu, 7 Oct 1999 14:37:02 +0200 (MET DST) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id OAA07922 for ; Thu, 7 Oct 1999 14:37:01 +0200 (MET DST) Received: from sun-demons.lri.fr (sun-demons.lri.fr [129.175.8.90]) by lri.lri.fr (8.9.1a/8.9.1) with ESMTP id OAA03429 for ; Thu, 7 Oct 1999 14:37:01 +0200 (MET DST) Received: (from urbain@localhost) by sun-demons.lri.fr (8.9.1a/8.9.1) id OAA03157; Thu, 7 Oct 1999 14:37:00 +0200 (MET DST) X-Authentication-Warning: sun-demons.lri.fr: urbain set sender to urbain@sun-demons using -f From: Xavier Urbain MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <14332.37868.641908.893938@sun-demons> Date: Thu, 7 Oct 1999 14:37:00 +0200 (MET DST) To: caml-list@inria.fr Subject: Re: speed versus C In-Reply-To: <37FC4419.6C9E3B02@maxtal.com.au> References: <000f01bf0de7$2f626fd0$240cbed4@jannt> <99100522193302.17263@ice> <37FC4419.6C9E3B02@maxtal.com.au> X-Mailer: VM 6.62 under Emacs 20.3.1 Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit Sender: weis While talking about efficiency of ocaml versus C, I have to say that as JC-Filliatre said before concerning gmp and num, we tried several algorithms in order to compute huge fibonacci numbers. We are as efficient (and in one case much more) as C with nice readable code as a bonus. Actually most of the time is spent in gmp (far better than num in THAT case) so... I should put those files on my web page. Concerning other problems like "solitaire" solver or emacs' mpuz solver (without any extenal library) we have quite comparable times. I strongly agree with Gerd Stolpmann when he write that ocaml offer the opportunity of coding directly (I should add "naturally") more sophisticated algorithms. Finally remember that the ocamlopt compiler makes NO OPTIMIZATION (not even multiplication by constant). Try then C code compiled without flags such as -O3 -fomit-frame-pointer and so on. Xavier -- Xavier Urbain --------------------------------------------------------------- L.R.I., Bât 490 mailto: Xavier.Urbain@lri.fr Université de Paris-Sud phoneto: (33) 1 69 15 42 32 F-91405 Orsay cedex faxto: (33) 1 69 15 65 86 http://www.lri.fr/Francais/Recherche/demons/membres/urbain.html ---------------------------------------------------------------