Skip to content

Big integer multiplication library for Go using Fast Fourier transform

License

Notifications You must be signed in to change notification settings

landjalan/bigfft

Repository files navigation

Benchmarking math/big vs. bigfft

Number size      old ns/op    new ns/op    delta
  1kb                 1599         1668   +4.32%
 10kb                61533        62427   +1.45%
100kb              2567995      2683862   +4.51%
  1Mb            105237800     33648160  -68.03%
  5Mb           1272947000    219950000  -82.72%
 10Mb           3834354000    578960600  -84.90%
 20Mb          11514488000   1219312000  -89.41%
 50Mb          49199945000   3203904000  -93.49%
100Mb         147599836000   8546686000  -94.21%

Benchmarking GMP vs bigfft

Number size   GMP ns/op     Go ns/op    delta
  1kb               536         1668  +211.19%
 10kb             26669        62427  +134.08%
100kb            686813      2683862  +290.77%
  1Mb          12100000     33648160  +178.08%
  5Mb         111731843    219950000  +96.86%
 10Mb         212314000    578960600  +172.69%
 20Mb         490196000   1219312000  +148.74%
 50Mb        1280000000   3203904000  +150.31%
100Mb        2673000000   8546686000  +219.74%

Benchmarks were run on a Core 2 Quad Q8200 (2.33GHz).
FFT is enabled when input numbers are over 200kbits.

About

Big integer multiplication library for Go using Fast Fourier transform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 81.1%
  • Assembly 18.9%