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: sebastien FURIC <sebastien.furic@t...>
Subject: Re: [Caml-list] Num library
 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