Changes between Version 21 and Version 22 of ReplacingGMPNotes


Ignore:
Timestamp:
Sep 1, 2006 7:37:00 PM (8 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ReplacingGMPNotes

    v21 v22  
    6363Esa Ilari Vuokko, who at one time attempted to replace GMP with [http://math.libtomcrypt.com/ LibTomMath], posted several messages with good notes on the current implementation.  Much of what is on this page is derived from those notes.  See, [http://www.haskell.org/pipermail/glasgow-haskell-users/2006-August/010669.html Replacement for GMP(3)] and [http://www.haskell.org/pipermail/glasgow-haskell-users/2006-August/010674.html Replacement for GMP(4)]. 
    6464 
     65=== Benchmarks for Multi-Precision Libraries === 
     66 
     67The benchmarks below were made with unmodified multi-precision libraries for Integral Arithmetic compiled using Apple gcc 4.0.1 with optimisation settings: -O3 -ftree-vectorize -falign-loops=16.  The tests performed Multiplication, Squaring, Powers (up to 7) and Division each 1,000,000 times at various levels of precision based on the number of bits in the operands.  Multi-precision libraries may use unsigned chars, unsigned ints, unsigned long ints, unsigned long long ints or doubles, so the actual number of "words" in each multi-precision array may differ; for multi-precision real numbers using doubles, integer precision was calculated at 48.3 bits of real precision per double, rounded up to 49.  (49 bits conservatively equates to about 9 decimal digits.)  Libraries tested were: 
     68[http://crd.lbl.gov/~dhbailey/mpdist/ ARPREC]  
     69[http://www.openssl.org/ OpenSSL's BN] (part of libcrypto) 
     70[http://swox.com/gmp/ GMP] 
     71[http://math.libtomcrypt.com/ LibTomMath] 
     72[http://www.eskimo.com/~weidai/cryptlib.html Crypto++] a cryptographic library in C++, the Integer class 
     73[http://botan.randombit.net/ Botan] a cryptographic library in C++,  
     74[http://www.cs.dartmouth.edu/~sting/mpi/ MPI] (MPI) 
     75[http://www.tc.umn.edu/~ringx004/mapm-main.html MAPM] (MPI) 
     76 
     77Crypto++, Botan, MPI and MAPM showed performance far below ARPREC, OpenSSL's BN, GMP and LibTomMath, so results are only shown for the last four.  Note that there are other libraries available for arbitrary precision arithmetic other than those mention here.   
     78 
    6579[[Image(Multiplication.gif)]] 
    6680