New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

bigint-benchmark

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigint-benchmark

Source
crates.io
Version
0.4.2
Version published
Total downloads
7.3K
Maintainers
1
Created
Source

bigint-benchmark-rs

Benchmarks for Rust big integer implementations.

All benchmarks are run on Intel(R) Xeon(R) w7-3565X. We may benchmark more platforms in the future. Please open an issue if you want to have another platform added.

Each benchmark is run 5 times, with the calculation repeated for at least 10 seconds each time. The fastest attempt is used as the result.

Libraries

LibraryVersionLicenseNotes
malachite0.14.0LGPL 3.0Derived from GMP and FLINT. Pure Rust, no_std
rug1.30.0LGPL 3.0Links to GMP
dashu0.4.2MIT or Apache 2.0Fork of ibig. Pure Rust, no_std
num-bigint0.4.6MIT or Apache 2.0Pure Rust, no_std
ibig0.3.6MIT or Apache 2.0Pure Rust, no_std

Results

Librarye 100ke 1me 10mfib 10mfib 100mfib_hex 100m
malachite0.0080.1301.8540.1542.0710.242
rug0.0080.1462.4400.1652.7820.483
dashu0.0190.49710.3240.60914.5002.798
num-bigint0.0190.58218.2610.74123.8215.430
ibig0.0190.60219.0940.75925.1715.193

Times in seconds.

Usage

Calculate 100 digits of e and compare answers:

$ bigint-benchmark --task e --lib ibig --lib num-bigint --lib rug --lib malachite --lib dashu -n 100 print                                             
answer = 2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427
ibig       agrees
num-bigint agrees
rug        agrees
malachite  agrees
dashu      agrees

Calculate the 500-th Fibonacci number and compare answers:

$ bigint-benchmark --task fib --lib ibig --lib num-bigint --lib rug --lib malachite --lib dashu -n 500 print                                            
answer = 139423224561697880139724382870407283950070256587697307264108962948325571622863290691557658876222521294125
ibig       agrees
num-bigint agrees
rug        agrees
malachite  agrees
dashu      agrees

Benchmark calculating a million digits of e:

$ bigint-benchmark --task e --lib ibig --lib num-bigint --lib rug --lib malachite --lib dashu -n 1000000 benchmark

Tasks

TaskDescriptionDifficultyAlgorithmOperations
en digits of eHardBinary splittingaddition, multiplication, division, exponentiation, base conversion
fibn-th Fibonnaci numberMediumMatrix exponentiationaddition, multiplication, base conversion
fib_hexn-th Fibonnaci number in hexEasyMatrix exponentiationaddition, multiplication

FAQs

Package last updated on 13 Oct 2026

Related posts