$ g++ -std=c++17 main.cpp -Ofast -o biginteger_benchmark
Download the big-number generating script NumGen
from https://sourceforge.net/projects/specter-aal/
$ # generate numbers with 1'000'000 digits
$ ./NumGen
...
--- Done ---
$ ls -sh MyNum
2,0M MyNum
$ # run benchmark
$ ./biginteger_benchmark < MyNum
...9999999999999999999999999999999998
Computation of z took 0.327ms
digits(x) = 1000000
digits(y) = 1000000
digits(z) = 1000001
Modify the number of repeats in the script NumGen
from 100 to 10000.
Then repeat:
$ # generate numbers with 1'000'000 digits
$ ./NumGen
...
--- Done ---
$ ls -sh MyNum
191M MyNum
$ # run benchmark
$ ./biginteger_benchmark < MyNum
...9999999999999999999999999999999998
Computation of z took 66.7ms
digits(x) = 100000000
digits(y) = 100000000
digits(z) = 100000001