comp.lang.ada
 help / color / mirror / Atom feed
From: gisle@apal.ii.uib.no (Gisle S�lensminde)
Subject: Re: Multiprecisions numbers
Date: 2000/04/02
Date: 2000-04-02T00:00:00+00:00	[thread overview]
Message-ID: <slrn8eedb0.cga.gisle@apal.ii.uib.no> (raw)
In-Reply-To: 38E5BFDD.AB9ED487@maths.unine.ch

In article <38E5BFDD.AB9ED487@maths.unine.ch>, Gautier wrote:
>Pascal Obry:
>
>> Do you have some benchmarks about the relative speed of these
>> implementations ?
>
>This would be very interesting (not time and equipment myself now)
>E.g. GMP and other known packages, being in C, must allocate, reallocate,
>deallocate memory for multi-integer. It consume time and the memory
>gets fragmented very fast, requiring garbage collection that can take
>longer than the computing itself. Reversely, pure Ada methods where functions
>can return a whole unconstrained array, can work only on stack with
>local variables. Anyway, using the "procedure with out parameter" variants
>give very quick results on OpenVMS (Compaq Ada V3.5-2) and PC (GNAT/DOS).
>No comparisons though from my side.

The packages is not (yet?) comparable. The thick binding to AdaGMP 
use controlled types and operator overloading, which certainly is
inefficient, but is convenient to use. If any of the other bignum 
packages not beats the thick binding to GMP, they should consider 
a rewrite of their packages. I will hopefully do some "smart copying"
in the future, so it can be faster. Adding some proceeures which don't
need finalization like the operators is also an idea.

The GMP contains a wealth of functions, more than 100 integer functions,
about 50 floating point functions and 20 rational number functions.
It will be a considerable work to implement this. My motivation for
creating the binding was to experiment with public-key cryptography.
The GMP contains all the functions you need for RSA or Diffie-Hellman
key exchange, like modular exponentiation and multiplicative inverses.
These functions is typically not called many times, but each call is
quite costly (well at least for key exchange, not encryption). 
Is any of the other bignum libraries having these functions?

It will maybe be an idea to coordinate the effort, and make one
single bignum library? (A discussion that is more suited for gnatlist?)


-- 
--
Gisle S�lensminde ( gisle@ii.uib.no )   

ln -s /dev/null ~/.netscape/cookies




  parent reply	other threads:[~2000-04-02  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-31  0:00 Re : Multiprecisions numbers DELCOURT J�r�me
2000-03-31  0:00 ` Pascal Obry
2000-04-01  0:00   ` Gautier
2000-04-01  0:00     ` DELCOURT J�r�me
2000-04-02  0:00     ` Gisle S�lensminde [this message]
2000-04-04  0:00       ` DELCOURT J�r�me
2000-04-01  0:00   ` DELCOURT J�r�me
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox