| My current Perl Projects - BigInt Benchmarks |
The following benchmarks were all created with Bigbench. The include and definition files to generate them, along with the full ASCII output are found in the .tgz files that are listed along with each benchmark.
Please see here for even newer benchmarks between the different BigInt versions.
Comparisation between v1.49 and older versions
2002-01-09
Benchmark was done on a 1050 Mhz AMD Athlon
under Linux with 32 bit Perl v5.7.2 Patchlevel 13382.
Full version
BigBench v0.07 (c) Copyright by Tels 2001. Have fun!
Wed Jan 9 11:37:49 2002 Reading templates from 'latest/'...done.
Got 4 templates.
Wed Jan 9 11:37:49 2002 Reading definitions from bigint.def...done.
Got 254 ops in 29 groups.
Each op will run for at least 3 seconds.
Results are scaled by factor 1 and rounded to 3 digits.
The benchmark will run for approximately 2.1 hours.
Running 'v0.01':
Benchmarking group 1 ('new'):
1 1 34500 ops/s
[snip]
33 out of 1016 (3.25%) benchmarks failed to return a result.
Wed Jan 9 13:40:13 2002 Numbers are absolute ops/s, scaled by factor 1.
| v0.01 v1.47 v1.48 v1.49
-------------------+--------------------------------
new: | 26700 9930 9780 7850
new specials: | 63100 28200 27700 27200
bsqrt: | n/a 326 2570 318
binc: | n/a 23700 24700 34900
++: | 3360 8580 8830 10300
bdec: | n/a 19400 20000 26200
--: | 3120 8770 8940 10300
badd: | 3370 6980 7090 8120
bsub: | 2980 5460 5530 6130
$x - $y: | 3980 4760 5010 5380
bmul: | 4050 6180 7090 7920
bneg: | 22700 87200 87100 89800
bnot: | 3100 10200 10500 18100
x = -x: | 12700 14300 14300 14500
babs: | 24200 243000 244000 244000
x = abs(x): | 36700 115000 84600 84600
x->bpow(y): | 3690 5090 5230 4900
x ** y: | 4930 4790 4830 4400
bdiv: | 2090 3030 5070 4820
bdiv list: | 1790 2520 3760 3430
bmod: | 3280 8850 8250 9200
copy: | 19900 22000 21900 22300
copy via new: | 20500 17700 17600 17300
brsft: | 1280 1270 1730 4400
blsft: | 1280 1980 2100 5960
band: | 735 405 2390 2690
bxor: | 276 781 2220 2460
bior: | 276 181 2230 2480
round: | n/a 15300 16100 21100
...................|................................
Wed Jan 9 13:40:15 2002 All done. Enjoy!
BigBench v0.07 (c) Copyright by Tels 2001. Have fun!
Wed Jan 9 13:40:15 2002 Reading templates from 'latest/'...done.
Got 4 templates.
Wed Jan 9 13:40:15 2002 Reading definitions from bigfloat.def...done.
Got 220 ops in 25 groups.
Each op will run for at least 3 seconds.
Results are scaled by factor 1 and rounded to 3 digits.
The benchmark will run for approximately 100 minutes.
Running 'v0.01':
Benchmarking group 1 ('new'):
1 1 29600 ops/s
[snip]
85 out of 880 (9.66%) benchmarks failed to return a result.
Wed Jan 9 15:09:23 2002 Numbers are absolute ops/s, scaled by factor 1.
| v0.01 v1.47 v1.48 v1.49
-------------------+--------------------------------
new: | 24100 2610 2610 2420
new specials: | 56200 14800 13700 13200
fsqrt: | 82.2 3.84 137 81.8
finc: | n/a 3760 3840 3980
++: | 2150 1860 2010 2060
fdec: | n/a 2740 2810 3810
--: | 2290 1540 1640 2020
fadd: | 1920 764 784 802
fsub: | 1690 743 760 777
$x - $y: | 2140 581 617 681
fmul: | 3210 1840 2610 3340
x * y: | 2630 1470 2020 2420
fneg: | 9980 n/a 34500 34700
fnot: | n/a n/a 2110 3740
x = -x: | 6430 5640 6550 6590
fabs: | 12100 53300 54000 53300
x = abs(x): | 32000 100000 102000 96900
x->fpow(y): | n/a 1440 1620 1790
x ** y: | n/a 1130 1290 1380
fdiv: | 1170 1210 652 1160
fmod: | 2110 3490 3520 709
copy: | 9590 6570 7930 8060
copy via new: | 9760 6330 7540 7460
frsft: | n/a n/a 259 300
flsft: | n/a n/a 628 740
...................|................................
Wed Jan 9 15:09:24 2002 All done. Enjoy!
Some comments:
I forgot to include the definitions for converting between hex, decimal and
binary forms. These benchmarks will be done once v1.50 is out.
Some things got slower in v1.49. In most this is due to bugfixes
(correct results sometimes require more work ;), but in some cases this it
due to introduced bugs, or due to "shifting" of the speed. For instance,
bsqrt() and fsqrt() are slower due to an oversight, this will be corrected in
v1.50 (and very probably it will get even faster). However, I have not yet
an idea why fmod() is slower. And for instance, bpow() is quite slower for the
unlikely cases 1 ** $x (where $x is 1, or 100 or whatever), but it more than
twice as fast for nearly everything using numbers below 7 ** 777. The average,
however appears to be slower, because the very fast shortcuts for 1 ** $x
weight as much as the other cases, which doesn't reflect the real world. Real
world programs pretty much get all faster in this case. That's why this is only
a benchmark ;)
To top of page
Comparisation between dual and single base math
2002-01-09
Benchmark was done on a 1050 Mhz AMD Athlon
under Linux with 32 bit Perl v5.7.2 Patchlevel 13382.
Full version
BigBench v0.07 (c) Copyright by Tels 2001. Have fun!
Wed Jan 9 08:32:52 2002 Reading templates from 'v1.49/'...done.
Got 6 templates.
Wed Jan 9 08:32:52 2002 Reading definitions from bigint.def...done.
Got 254 ops in 29 groups.
Each op will run for at least 3 seconds.
Results are scaled by factor 1 and rounded to 3 digits.
The benchmark will run for approximately 3.2 hours.
Running 'v1.48_v0.17':
Benchmarking group 1 ('new'):
1 1 14700 ops/s
[snip]
57 out of 1524 (3.74%) benchmarks failed to return a result.
Wed Jan 9 11:37:46 2002 Numbers are absolute ops/s, scaled by factor 1.
| v1.48 v1.49 v1.49 v1.49 v1.49 v1.49
| v0.17 v0.18 v0.19 v0.19 v0.20 v0.20
| 7-7 7-9 7-7 7-9
-------------------+--------------------------------------------------
new: | 9520 7840 7870 8010 7860 7980
new specials: | 27800 27300 27300 27200 27000 26900
bsqrt: | 2510 2600 316 300 316 304
binc: | 24600 34600 35200 35100 34900 35000
++: | 8770 10300 10200 10500 10300 10600
bdec: | 20100 26600 26500 26500 26200 26200
--: | 8950 10400 10300 10600 10300 10600
badd: | 7110 8260 8260 8440 8120 8410
bsub: | 5510 6090 6120 6290 6090 6300
$x - $y: | 4980 5390 5380 5470 5400 5490
bmul: | 7040 7990 8030 6400 7930 6440
bneg: | 86400 89600 89400 89500 89600 89600
bnot: | 10500 18200 18200 18200 18100 18200
x = -x: | 14200 14300 14400 14800 14500 14800
babs: | 247000 245000 246000 245000 247000 246000
x = abs(x): | 675000 94100 89700 126000 117000 88900
x->bpow(y): | 5240 4930 4940 4210 4950 4310
x ** y: | 4810 4420 4400 3770 4410 3850
bdiv: | 5100 4810 4840 4670 4820 4640
bdiv list: | 3780 3440 3460 3320 3430 3310
bmod: | 8230 9170 9190 8950 9210 9010
copy: | 22100 22400 22500 23300 22600 23000
copy via new: | 17800 17300 17400 17900 17300 17800
brsft: | 1730 4400 4430 3430 4430 3560
blsft: | 2090 6020 5980 3810 5970 4030
band: | 2400 2700 785 1690 2690 2080
bxor: | 2220 2480 821 1520 2460 1800
bior: | 2230 2500 852 1540 2480 1820
round: | 16100 20500 21200 21300 21200 21000
...................|..................................................
Wed Jan 9 11:37:49 2002 All done. Enjoy!
Some comments
Since the math with two different bases is much slower than with one simple
base, it is disabled by default, so the Calc.pm v0.20 7-7 column should be more
or less identical to the column in the previous benchmark comparing v1.49 to
older versions.