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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yaron M. Minsky <yminsky@C...>
Subject: Re: [Caml-list] Num library
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