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 QAA02529; Thu, 10 Oct 2002 16:56:53 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 QAA02249 for ; Thu, 10 Oct 2002 16:56:52 +0200 (MET DST) Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9AEupD00469 for ; Thu, 10 Oct 2002 16:56:51 +0200 (MET DST) Received: from user-0ccegbj.cable.mindspring.com ([24.199.65.115] helo=dragonfly.localdomain) by hawk.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 17zek6-0002BS-00 for caml-list@inria.fr; Thu, 10 Oct 2002 07:56:50 -0700 Received: from 209-9-234-140.sdsl.cais.net ([209.9.234.140]) (SquirrelMail authenticated user yminsky) by dragonfly.localdomain with HTTP; Thu, 10 Oct 2002 10:56:50 -0400 (EDT) Message-ID: <23100.209.9.234.140.1034261810.squirrel@dragonfly.localdomain> Date: Thu, 10 Oct 2002 10:56:50 -0400 (EDT) Subject: Re: [Caml-list] Num library From: "Yaron M. Minsky" To: In-Reply-To: <3DA54B75.80A7E7ED@tni.fr> References: <3DA54B75.80A7E7ED@tni.fr> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal X-Mailer: SquirrelMail (version 1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Num is by all accounts a pretty mediocre bignum implementation. There's also mlgmp, which is an interface to GMP. I haven't used it, but GMP is fast. There's also Numerix, which I have used. Numerix at least at one point was a good deal faster than GMP in many cases, and is very easy to use. I'm not sure how GMP and Numerix compare in terms of speed these days, since GMP has seen more development and Numerix has not. y > Hello, > > Alain Frisch a écrit : >> >> Hello Caml List, >> >> I'm considering using the Num library (from the standard distribution) >> for implementing numbers in an interpreter. Questions: >> >> - Is there any benchmark available ? What is the overhead when >> dealing >> with "small" integers ? >> >> - How does the library compare with other large/rational numbers >> implementations ? > > I made some benchmarks with Dolphin Smalltalk (a pure Smalltalk > bytecode interpreter) and O'Caml (using ocamlopt) a few months ago. To > my great surprise, Dolphin Samlltalk outperformed O'Caml by a factor of > 4 over various tests IIRC. I think the same results may be obtained > with other modern big numbers implementations against O'Caml's one. > The context was the following: I had to rewrite a program that performs > symbolic manipulations from Smalltalk to O'Caml and this benchmark was > the first thing I did to test O'Caml's performance (I was a little > disappointed!). Finally, despite O'Caml's poor performance over bignum > computations, O'Caml outperformed Smalltalk by a factor of 100 over > "real world" benchmarks! (because only a few percents of the time is > spent in bignum calculations and most of the time is spent doing > substitutions etc.). > > Sébastien. > ------------------- > 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 -- |--------/ Yaron M. Minsky \--------| |--------\ http://www.cs.cornell.edu/home/yminsky/ /--------| Open PGP --- KeyID B1FFD916 (new key as of Dec 4th) Fingerprint: 5BF6 83E1 0CE3 1043 95D8 F8D5 9F12 B3A9 B1FF D916 ------------------- 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