Skip to content

Benchmarks of a new algorithm to compute the Jacobi symbol

Notifications You must be signed in to change notification settings

jonas-lj/jacobi-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jacobi-benchmarks

This repo contains a new, optimised implementation of an algorithm to compute the Jacobi symbol.

The algorithm is an optimisation of the one often presented in textbooks, and also on Wikipedia.

The optimised version, jacobi_new, is 72% faster, and it is 45% faster than the only other Rust implementation available for large integers which is found in the num-bigint-dig crate.

The output of the benchmarks from a Macbook Pro M1 is as follows. All timings are in µs.

Input size (bits) 128 256 384 512 768 1024 2048 3072
Base 15.58 35.476 55.605 79.086 131.5 191.9 541.61 1091.5
New 3.9589 9.883 17.15 23.423 37.026 53.229 146.26 287.22
num-bigint-dig 6.1464 17.199 32.904 45.877 75.78 105.62 259.33 521.38

To run the benchmarks, run cargo bench in the root of the repo.

About

Benchmarks of a new algorithm to compute the Jacobi symbol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages