Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b18de60bc9

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
Makefile
README
bmark1-bignum.rb
bmark1-c
bmark1-c.c
bmark1-gmp.rb
bmark2-bignum.rb
bmark2-c
bmark2-c.c
bmark2-gmp.rb
bmark2-gmp_self.rb
bmark3.rb
bmark4.rb

README

Ruby-GMP is significantly faster than Ruby BigNum,
and not much slower than direct C GMP,
but only on big numbers.

BigNum performs better on small numbers, but that's
mostly due to overhead of Ruby-GMP, not libGMP.
You can test where switch is reasonable using benchmarks 3 and 4.

Provided benchmarks check:
    benchmark 1		multiplication of big numbers
    benchmark 2		addition of big numbers
    benchmark 3		addition on various sizes
    benchmark 4		multiplication on various sizes
Something went wrong with that request. Please try again.