Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77266 - in sandbox/big_number: boost/multiprecision libs/multiprecision/performance
From: john_at_[hidden]
Date: 2012-03-08 12:54:28


Author: johnmaddock
Date: 2012-03-08 12:54:28 EST (Thu, 08 Mar 2012)
New Revision: 77266
URL: http://svn.boost.org/trac/boost/changeset/77266

Log:
Fix some bugs in division and addition code
Text files modified:
   sandbox/big_number/boost/multiprecision/cpp_int.hpp | 4
   sandbox/big_number/libs/multiprecision/performance/performance_test-gcc-linux.log | 665 +++++++--------------------------------
   sandbox/big_number/libs/multiprecision/performance/performance_test.cpp | 3
   3 files changed, 127 insertions(+), 545 deletions(-)

Modified: sandbox/big_number/boost/multiprecision/cpp_int.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/cpp_int.hpp (original)
+++ sandbox/big_number/boost/multiprecision/cpp_int.hpp 2012-03-08 12:54:28 EST (Thu, 08 Mar 2012)
@@ -1060,7 +1060,7 @@
    typename cpp_int_backend<MinBits, Signed, Allocator>::limb_pointer pr = result.limbs();
 
    double_limb_type carry = 0;
- std::memset(pr, 0, (as + bs) * sizeof(limb_type));
+ std::memset(pr, 0, result.size() * sizeof(limb_type));
    unsigned inner_limit = result.size() - as;
    for(unsigned i = 0; i < as; ++i)
    {
@@ -1242,7 +1242,7 @@
    {
       double_limb_type a, b;
       a = (static_cast<double_limb_type>(px[1]) << cpp_int_backend<MinBits, Signed, Allocator>::limb_bits) | px[0];
- b = y_order > 1 ?
+ b = y_order ?
          (static_cast<double_limb_type>(py[1]) << cpp_int_backend<MinBits, Signed, Allocator>::limb_bits) | py[0]
          : py[0];
       result = a / b;

Modified: sandbox/big_number/libs/multiprecision/performance/performance_test-gcc-linux.log
==============================================================================
--- sandbox/big_number/libs/multiprecision/performance/performance_test-gcc-linux.log (original)
+++ sandbox/big_number/libs/multiprecision/performance/performance_test-gcc-linux.log 2012-03-08 12:54:28 EST (Thu, 08 Mar 2012)
@@ -1,542 +1,123 @@
-gmp_int 64 + 0.0168195
-gmp_int 64 - 0.0186168
-gmp_int 64 * 0.0114224
-gmp_int 64 / 0.168483
-gmp_int 64 str 0.000337753
-gmp_int 64 +(int)0.00683062
-gmp_int 64 -(int)0.00706193
-gmp_int 64 *(int)0.00869587
-gmp_int 64 /(int)0.0453323
-gmp_int 64 % 0.157804
-gmp_int 64 | 0.00932423
-gmp_int 64 & 0.00944499
-gmp_int 64 ^ 0.00996572
-gmp_int 64 << 0.00922261
-gmp_int 64 >> 0.00918099
-gmp_int 64 %(int)0.0281261
-gmp_int 64 |(int)0.0397808
-gmp_int 64 &(int)0.0415959
-gmp_int 64 ^(int)0.0404741
-gmp_int 64 gcd 0.176988
-gmp_int 128 + 0.0179677
-gmp_int 128 - 0.0189371
-gmp_int 128 * 0.0161959
-gmp_int 128 / 0.190813
-gmp_int 128 str 0.000372045
-gmp_int 128 +(int)0.00848258
-gmp_int 128 -(int)0.00875216
-gmp_int 128 *(int)0.0113487
-gmp_int 128 /(int)0.0525228
-gmp_int 128 % 0.15826
-gmp_int 128 | 0.0106091
-gmp_int 128 & 0.0112477
-gmp_int 128 ^ 0.0113254
-gmp_int 128 << 0.0100071
-gmp_int 128 >> 0.00769246
-gmp_int 128 %(int)0.0347099
-gmp_int 128 |(int)0.0407317
-gmp_int 128 &(int)0.0426387
-gmp_int 128 ^(int)0.041833
-gmp_int 128 gcd 0.432692
-gmp_int 256 + 0.0228276
-gmp_int 256 - 0.0253604
-gmp_int 256 * 0.0424289
-gmp_int 256 / 0.232371
-gmp_int 256 str 0.000590578
-gmp_int 256 +(int)0.0111117
-gmp_int 256 -(int)0.0119104
-gmp_int 256 *(int)0.0138547
-gmp_int 256 /(int)0.0658471
-gmp_int 256 % 0.189604
-gmp_int 256 | 0.0128476
-gmp_int 256 & 0.0148126
-gmp_int 256 ^ 0.0134169
-gmp_int 256 << 0.0117499
-gmp_int 256 >> 0.00808343
-gmp_int 256 %(int)0.0471351
-gmp_int 256 |(int)0.0423473
-gmp_int 256 &(int)0.0436809
-gmp_int 256 ^(int)0.0426564
-gmp_int 256 gcd 2.06786
-gmp_int 512 + 0.0274004
-gmp_int 512 - 0.0318076
-gmp_int 512 * 0.097384
-gmp_int 512 / 0.272392
-gmp_int 512 str 0.0012598
-gmp_int 512 +(int)0.0142198
-gmp_int 512 -(int)0.0148327
-gmp_int 512 *(int)0.0179982
-gmp_int 512 /(int)0.0906272
-gmp_int 512 % 0.22163
-gmp_int 512 | 0.0211022
-gmp_int 512 & 0.0165864
-gmp_int 512 ^ 0.0218245
-gmp_int 512 << 0.0145569
-gmp_int 512 >> 0.00978776
-gmp_int 512 %(int)0.0601084
-gmp_int 512 |(int)0.0460084
-gmp_int 512 &(int)0.0466719
-gmp_int 512 ^(int)0.045828
-gmp_int 512 gcd 4.69155
-gmp_int 1024 + 0.038508
-gmp_int 1024 - 0.0417826
-gmp_int 1024 * 0.315222
-gmp_int 1024 / 0.352494
-gmp_int 1024 str 0.00274057
-gmp_int 1024 +(int)0.0187457
-gmp_int 1024 -(int)0.0194778
-gmp_int 1024 *(int)0.0259764
-gmp_int 1024 /(int)0.140287
-gmp_int 1024 % 0.284404
-gmp_int 1024 | 0.0242278
-gmp_int 1024 & 0.0235658
-gmp_int 1024 ^ 0.0249122
-gmp_int 1024 << 0.0202809
-gmp_int 1024 >> 0.0127441
-gmp_int 1024 %(int)0.0758432
-gmp_int 1024 |(int)0.0495155
-gmp_int 1024 &(int)0.0503542
-gmp_int 1024 ^(int)0.0510615
-gmp_int 1024 gcd 10.1136
-cpp_int 64 + 0.0157994
-cpp_int 64 - 0.0256769
-cpp_int 64 * 0.0226198
-cpp_int 64 / 0.102281
-cpp_int 64 str 0.000380146
-cpp_int 64 +(int)0.0103873
-cpp_int 64 -(int)0.00898962
-cpp_int 64 *(int)0.0159193
-cpp_int 64 /(int)0.0522854
-cpp_int 64 % 0.0999552
-cpp_int 64 | 0.0203489
-cpp_int 64 & 0.0202989
-cpp_int 64 ^ 0.020334
-cpp_int 64 << 0.0166545
-cpp_int 64 >> 0.0143805
-cpp_int 64 %(int)0.0389361
-cpp_int 64 |(int)0.0198498
-cpp_int 64 &(int)0.024074
-cpp_int 64 ^(int)0.0198061
-cpp_int 64 gcd 1.72384
-cpp_int 128 + 0.0182643
-cpp_int 128 - 0.0271678
-cpp_int 128 * 0.0408988
-cpp_int 128 / 0.172852
-cpp_int 128 str 0.000693873
-cpp_int 128 +(int)0.0116175
-cpp_int 128 -(int)0.0104572
-cpp_int 128 *(int)0.0187569
-cpp_int 128 /(int)0.108782
-cpp_int 128 % 0.179562
-cpp_int 128 | 0.0245406
-cpp_int 128 & 0.0245186
-cpp_int 128 ^ 0.0247923
-cpp_int 128 << 0.0196597
-cpp_int 128 >> 0.0157968
-cpp_int 128 %(int)0.0940069
-cpp_int 128 |(int)0.0210111
-cpp_int 128 &(int)0.0322746
-cpp_int 128 ^(int)0.0210955
-cpp_int 128 gcd 3.97787
-cpp_int 256 + 0.0236538
-cpp_int 256 - 0.0339319
-cpp_int 256 * 0.107568
-cpp_int 256 / 0.376559
-cpp_int 256 str 0.00192567
-cpp_int 256 +(int)0.0156148
-cpp_int 256 -(int)0.0125633
-cpp_int 256 *(int)0.0227126
-cpp_int 256 /(int)0.240023
-cpp_int 256 % 0.324919
-cpp_int 256 | 0.0273651
-cpp_int 256 & 0.0268812
-cpp_int 256 ^ 0.027153
-cpp_int 256 << 0.0240014
-cpp_int 256 >> 0.0178114
-cpp_int 256 %(int)0.196223
-cpp_int 256 |(int)0.0238206
-cpp_int 256 &(int)0.0518555
-cpp_int 256 ^(int)0.0237059
-cpp_int 256 gcd 9.44724
-cpp_int 512 + 0.0286286
-cpp_int 512 - 0.0473463
-cpp_int 512 * 0.36983
-cpp_int 512 / 0.53608
-cpp_int 512 str 0.00489147
-cpp_int 512 +(int)0.0165983
-cpp_int 512 -(int)0.0157028
-cpp_int 512 *(int)0.0327202
-cpp_int 512 /(int)0.39506
-cpp_int 512 % 0.484383
-cpp_int 512 | 0.0336779
-cpp_int 512 & 0.0332565
-cpp_int 512 ^ 0.033731
-cpp_int 512 << 0.032593
-cpp_int 512 >> 0.0249415
-cpp_int 512 %(int)0.347801
-cpp_int 512 |(int)0.0270701
-cpp_int 512 &(int)0.0847243
-cpp_int 512 ^(int)0.0270095
-cpp_int 512 gcd 22.6824
-cpp_int 1024 + 0.041093
-cpp_int 1024 - 0.065839
-cpp_int 1024 * 1.36107
-cpp_int 1024 / 0.91127
-cpp_int 1024 str 0.0150341
-cpp_int 1024 +(int)0.0212673
-cpp_int 1024 -(int)0.0207903
-cpp_int 1024 *(int)0.0482894
-cpp_int 1024 /(int)0.711756
-cpp_int 1024 % 0.853306
-cpp_int 1024 | 0.0459271
-cpp_int 1024 & 0.0455113
-cpp_int 1024 ^ 0.0457905
-cpp_int 1024 << 0.053456
-cpp_int 1024 >> 0.0339107
-cpp_int 1024 %(int)0.653379
-cpp_int 1024 |(int)0.0323199
-cpp_int 1024 &(int)0.152555
-cpp_int 1024 ^(int)0.032137
-cpp_int 1024 gcd 59.7424
-tommath_int 64 + 0.0166687
-tommath_int 64 - 0.0270094
-tommath_int 64 * 0.0386521
-tommath_int 64 / 0.98286
-tommath_int 64 str 0.00413258
-tommath_int 64 +(int)0.174336
-tommath_int 64 -(int)0.174454
-tommath_int 64 *(int)0.191871
-tommath_int 64 /(int)0.886522
-tommath_int 64 % 0.980074
-tommath_int 64 | 0.0716826
-tommath_int 64 & 0.0777977
-tommath_int 64 ^ 0.0730863
-tommath_int 64 << 0.0200111
-tommath_int 64 >> 0.124855
-tommath_int 64 %(int)0.734449
-tommath_int 64 |(int)0.254639
-tommath_int 64 &(int)0.226047
-tommath_int 64 ^(int)0.252631
-tommath_int 64 gcd 3.80432
-tommath_int 128 + 0.0169388
-tommath_int 128 - 0.0247515
-tommath_int 128 * 0.0588799
-tommath_int 128 / 1.11408
-tommath_int 128 str 0.00853237
-tommath_int 128 +(int)0.17465
-tommath_int 128 -(int)0.169003
-tommath_int 128 *(int)0.193938
-tommath_int 128 /(int)0.901904
-tommath_int 128 % 1.09735
-tommath_int 128 | 0.0714914
-tommath_int 128 & 0.0734869
-tommath_int 128 ^ 0.0724281
-tommath_int 128 << 0.0315817
-tommath_int 128 >> 0.137548
-tommath_int 128 %(int)0.835579
-tommath_int 128 |(int)0.25282
-tommath_int 128 &(int)0.22947
-tommath_int 128 ^(int)0.253212
-tommath_int 128 gcd 7.29351
-tommath_int 256 + 0.0191982
-tommath_int 256 - 0.0260308
-tommath_int 256 * 0.0850765
-tommath_int 256 / 1.3375
-tommath_int 256 str 0.0217479
-tommath_int 256 +(int)0.173229
-tommath_int 256 -(int)0.17296
-tommath_int 256 *(int)0.201834
-tommath_int 256 /(int)1.153
-tommath_int 256 % 1.34044
-tommath_int 256 | 0.074755
-tommath_int 256 & 0.0755475
-tommath_int 256 ^ 0.0805466
-tommath_int 256 << 0.0382785
-tommath_int 256 >> 0.141309
-tommath_int 256 %(int)1.19796
-tommath_int 256 |(int)0.255801
-tommath_int 256 &(int)0.233997
-tommath_int 256 ^(int)0.25474
-tommath_int 256 gcd 15.3331
-tommath_int 512 + 0.0240257
-tommath_int 512 - 0.0303227
-tommath_int 512 * 0.195612
-tommath_int 512 / 1.96548
-tommath_int 512 str 0.0563537
-tommath_int 512 +(int)0.174848
-tommath_int 512 -(int)0.176184
-tommath_int 512 *(int)0.223672
-tommath_int 512 /(int)1.68054
-tommath_int 512 % 1.95689
-tommath_int 512 | 0.0801272
-tommath_int 512 & 0.0806169
-tommath_int 512 ^ 0.080112
-tommath_int 512 << 0.0451545
-tommath_int 512 >> 0.151606
-tommath_int 512 %(int)1.74812
-tommath_int 512 |(int)0.260477
-tommath_int 512 &(int)0.237892
-tommath_int 512 ^(int)0.259232
-tommath_int 512 gcd 31.9471
-tommath_int 1024 + 0.035905
-tommath_int 1024 - 0.0429664
-tommath_int 1024 * 0.564578
-tommath_int 1024 / 3.17298
-tommath_int 1024 str 0.187413
-tommath_int 1024 +(int)0.190852
-tommath_int 1024 -(int)0.189438
-tommath_int 1024 *(int)0.271175
-tommath_int 1024 /(int)2.92342
-tommath_int 1024 % 3.20126
-tommath_int 1024 | 0.0939085
-tommath_int 1024 & 0.10264
-tommath_int 1024 ^ 0.0957583
-tommath_int 1024 << 0.0670281
-tommath_int 1024 >> 0.166781
-tommath_int 1024 %(int)2.88178
-tommath_int 1024 |(int)0.267844
-tommath_int 1024 &(int)0.252612
-tommath_int 1024 ^(int)0.270201
-tommath_int 1024 gcd 68.3106
-fixed_int 64 + 0.00139312
-fixed_int 64 - 0.00162339
-fixed_int 64 * 0.00699782
-fixed_int 64 / 0.0526074
-fixed_int 64 str 0.000220769
-fixed_int 64 +(int)0.00224121
-fixed_int 64 -(int)0.00194005
-fixed_int 64 *(int)0.0023299
-fixed_int 64 /(int)0.0222776
-fixed_int 64 % 0.0533221
-fixed_int 64 | 0.00173919
-fixed_int 64 & 0.00172375
-fixed_int 64 ^ 0.00173786
-fixed_int 64 << 0.000542177
-fixed_int 64 >> 0.000774259
-fixed_int 64 %(int)0.0213357
-fixed_int 64 |(int)0.00111648
-fixed_int 64 &(int)0.00122907
-fixed_int 64 ^(int)0.00107255
-fixed_int 64 gcd 0.694716
-fixed_int 128 + 0.00257987
-fixed_int 128 - 0.00292488
-fixed_int 128 * 0.0224222
-fixed_int 128 / 0.104045
-fixed_int 128 str 0.000463955
-fixed_int 128 +(int)0.00201262
-fixed_int 128 -(int)0.00162514
-fixed_int 128 *(int)0.0029339
-fixed_int 128 /(int)0.0854855
-fixed_int 128 % 0.104704
-fixed_int 128 | 0.00262052
-fixed_int 128 & 0.00263811
-fixed_int 128 ^ 0.00262317
-fixed_int 128 << 0.00169023
-fixed_int 128 >> 0.00194871
-fixed_int 128 %(int)0.0765247
-fixed_int 128 |(int)0.0012695
-fixed_int 128 &(int)0.00213023
-fixed_int 128 ^(int)0.00126692
-fixed_int 128 gcd 1.94748
-fixed_int 256 + 0.00534754
-fixed_int 256 - 0.0057397
-fixed_int 256 * 0.0746728
-fixed_int 256 / 0.188237
-fixed_int 256 str 0.00110489
-fixed_int 256 +(int)0.00239737
-fixed_int 256 -(int)0.00190618
-fixed_int 256 *(int)0.00532854
-fixed_int 256 /(int)0.176302
-fixed_int 256 % 0.185671
-fixed_int 256 | 0.00635312
-fixed_int 256 & 0.00641492
-fixed_int 256 ^ 0.00637518
-fixed_int 256 << 0.00364634
-fixed_int 256 >> 0.00339513
-fixed_int 256 %(int)0.148628
-fixed_int 256 |(int)0.00172278
-fixed_int 256 &(int)0.00394582
-fixed_int 256 ^(int)0.0017306
-fixed_int 256 gcd 5.69938
-fixed_int 512 + 0.0104641
-fixed_int 512 - 0.0108643
-fixed_int 512 * 0.244289
-fixed_int 512 / 0.361312
-fixed_int 512 str 0.00355548
-fixed_int 512 +(int)0.00521225
-fixed_int 512 -(int)0.00508137
-fixed_int 512 *(int)0.0104497
-fixed_int 512 /(int)0.347573
-fixed_int 512 % 0.359133
-fixed_int 512 | 0.0127562
-fixed_int 512 & 0.0127079
-fixed_int 512 ^ 0.0128838
-fixed_int 512 << 0.00909235
-fixed_int 512 >> 0.0100095
-fixed_int 512 %(int)0.294967
-fixed_int 512 |(int)0.00510309
-fixed_int 512 &(int)0.0108019
-fixed_int 512 ^(int)0.00519878
-fixed_int 512 gcd 18.0766
-fixed_int 1024 + 0.0269036
-fixed_int 1024 - 0.0307375
-fixed_int 1024 * 0.794034
-fixed_int 1024 / 0.761903
-fixed_int 1024 str 0.0139069
-fixed_int 1024 +(int)0.0107717
-fixed_int 1024 -(int)0.0107214
-fixed_int 1024 *(int)0.0264201
-fixed_int 1024 /(int)0.710635
-fixed_int 1024 % 0.762693
-fixed_int 1024 | 0.0266044
-fixed_int 1024 & 0.0265946
-fixed_int 1024 ^ 0.0266218
-fixed_int 1024 << 0.0208209
-fixed_int 1024 >> 0.0199434
-fixed_int 1024 %(int)0.591732
-fixed_int 1024 |(int)0.0107572
-fixed_int 1024 &(int)0.0279165
-fixed_int 1024 ^(int)0.0107153
-fixed_int 1024 gcd 72.0083
-[section:integer_performance Integer Type Perfomance]
-[table Operator %
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][1.87455 (0.0999552s)][1.71496 (0.179562s)][1.74997 (0.324919s)][2.18555 (0.484383s)][3.00033 (0.853306s)]]
-[[fixed_int][[*1] (0.0533221s)][[*1] (0.104704s)][[*1] (0.185671s)][1.62042 (0.359133s)][2.68172 (0.762693s)]]
-[[gmp_int][2.95944 (0.157804s)][1.51151 (0.15826s)][1.02118 (0.189604s)][[*1] (0.22163s)][[*1] (0.284404s)]]
-[[tommath_int][18.3802 (0.980074s)][10.4805 (1.09735s)][7.21942 (1.34044s)][8.82954 (1.95689s)][11.256 (3.20126s)]]
-]
-[table Operator %(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][1.82492 (0.0389361s)][2.70836 (0.0940069s)][4.16298 (0.196223s)][5.78623 (0.347801s)][8.61488 (0.653379s)]]
-[[fixed_int][[*1] (0.0213357s)][2.2047 (0.0765247s)][3.15324 (0.148628s)][4.90725 (0.294967s)][7.80205 (0.591732s)]]
-[[gmp_int][1.31826 (0.0281261s)][[*1] (0.0347099s)][[*1] (0.0471351s)][[*1] (0.0601084s)][[*1] (0.0758432s)]]
-[[tommath_int][34.4234 (0.734449s)][24.0732 (0.835579s)][25.4154 (1.19796s)][29.0828 (1.74812s)][37.9966 (2.88178s)]]
-]
-[table Operator &
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][11.776 (0.0202989s)][9.29397 (0.0245186s)][4.19042 (0.0268812s)][2.61699 (0.0332565s)][1.93124 (0.0455113s)]]
-[[fixed_int][[*1] (0.00172375s)][[*1] (0.00263811s)][[*1] (0.00641492s)][[*1] (0.0127079s)][1.12853 (0.0265946s)]]
-[[gmp_int][5.47931 (0.00944499s)][4.26352 (0.0112477s)][2.30908 (0.0148126s)][1.3052 (0.0165864s)][[*1] (0.0235658s)]]
-[[tommath_int][45.1327 (0.0777977s)][27.8558 (0.0734869s)][11.7768 (0.0755475s)][6.34384 (0.0806169s)][4.35544 (0.10264s)]]
-]
-[table Operator &(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][19.5872 (0.024074s)][15.1507 (0.0322746s)][13.1419 (0.0518555s)][7.84344 (0.0847243s)][5.46467 (0.152555s)]]
-[[fixed_int][[*1] (0.00122907s)][[*1] (0.00213023s)][[*1] (0.00394582s)][[*1] (0.0108019s)][[*1] (0.0279165s)]]
-[[gmp_int][33.8435 (0.0415959s)][20.016 (0.0426387s)][11.0702 (0.0436809s)][4.3207 (0.0466719s)][1.80374 (0.0503542s)]]
-[[tommath_int][183.918 (0.226047s)][107.721 (0.22947s)][59.3026 (0.233997s)][22.0231 (0.237892s)][9.04882 (0.252612s)]]
-]
-[table Operator *
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][3.2324 (0.0226198s)][2.52526 (0.0408988s)][2.53525 (0.107568s)][3.79765 (0.36983s)][4.31781 (1.36107s)]]
-[[fixed_int][[*1] (0.00699782s)][1.38444 (0.0224222s)][1.75995 (0.0746728s)][2.50851 (0.244289s)][2.51897 (0.794034s)]]
-[[gmp_int][1.63228 (0.0114224s)][[*1] (0.0161959s)][[*1] (0.0424289s)][[*1] (0.097384s)][[*1] (0.315222s)]]
-[[tommath_int][5.52344 (0.0386521s)][3.63548 (0.0588799s)][2.00515 (0.0850765s)][2.00866 (0.195612s)][1.79105 (0.564578s)]]
-]
-[table Operator *(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][6.83259 (0.0159193s)][6.39316 (0.0187569s)][4.26244 (0.0227126s)][3.13123 (0.0327202s)][1.85897 (0.0482894s)]]
-[[fixed_int][[*1] (0.0023299s)][[*1] (0.0029339s)][[*1] (0.00532854s)][[*1] (0.0104497s)][1.01708 (0.0264201s)]]
-[[gmp_int][3.73229 (0.00869587s)][3.86814 (0.0113487s)][2.60009 (0.0138547s)][1.72238 (0.0179982s)][[*1] (0.0259764s)]]
-[[tommath_int][82.3516 (0.191871s)][66.1027 (0.193938s)][37.8779 (0.201834s)][21.4047 (0.223672s)][10.4393 (0.271175s)]]
-]
-[table Operator +
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][11.341 (0.0157994s)][7.07953 (0.0182643s)][4.42331 (0.0236538s)][2.73588 (0.0286286s)][1.52741 (0.041093s)]]
-[[fixed_int][[*1] (0.00139312s)][[*1] (0.00257987s)][[*1] (0.00534754s)][[*1] (0.0104641s)][[*1] (0.0269036s)]]
-[[gmp_int][12.0732 (0.0168195s)][6.96456 (0.0179677s)][4.26881 (0.0228276s)][2.61851 (0.0274004s)][1.43133 (0.038508s)]]
-[[tommath_int][11.965 (0.0166687s)][6.56577 (0.0169388s)][3.5901 (0.0191982s)][2.29601 (0.0240257s)][1.33458 (0.035905s)]]
-]
-[table Operator +(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][4.63468 (0.0103873s)][5.77235 (0.0116175s)][6.51328 (0.0156148s)][3.18449 (0.0165983s)][1.97437 (0.0212673s)]]
-[[fixed_int][[*1] (0.00224121s)][[*1] (0.00201262s)][[*1] (0.00239737s)][[*1] (0.00521225s)][[*1] (0.0107717s)]]
-[[gmp_int][3.04774 (0.00683062s)][4.2147 (0.00848258s)][4.63494 (0.0111117s)][2.72815 (0.0142198s)][1.74027 (0.0187457s)]]
-[[tommath_int][77.7866 (0.174336s)][86.7776 (0.17465s)][72.258 (0.173229s)][33.5455 (0.174848s)][17.718 (0.190852s)]]
-]
-[table Operator -
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][15.8168 (0.0256769s)][9.28853 (0.0271678s)][5.91179 (0.0339319s)][4.35797 (0.0473463s)][2.14198 (0.065839s)]]
-[[fixed_int][[*1] (0.00162339s)][[*1] (0.00292488s)][[*1] (0.0057397s)][[*1] (0.0108643s)][[*1] (0.0307375s)]]
-[[gmp_int][11.4678 (0.0186168s)][6.47449 (0.0189371s)][4.41843 (0.0253604s)][2.92772 (0.0318076s)][1.35934 (0.0417826s)]]
-[[tommath_int][16.6376 (0.0270094s)][8.46239 (0.0247515s)][4.53521 (0.0260308s)][2.79104 (0.0303227s)][1.39785 (0.0429664s)]]
-]
-[table Operator -(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][4.63371 (0.00898962s)][6.43466 (0.0104572s)][6.59084 (0.0125633s)][3.09026 (0.0157028s)][1.93914 (0.0207903s)]]
-[[fixed_int][[*1] (0.00194005s)][[*1] (0.00162514s)][[*1] (0.00190618s)][[*1] (0.00508137s)][[*1] (0.0107214s)]]
-[[gmp_int][3.64008 (0.00706193s)][5.38549 (0.00875216s)][6.2483 (0.0119104s)][2.91903 (0.0148327s)][1.81672 (0.0194778s)]]
-[[tommath_int][89.9224 (0.174454s)][103.993 (0.169003s)][90.7363 (0.17296s)][34.6724 (0.176184s)][17.6692 (0.189438s)]]
-]
-[table Operator /
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][1.94422 (0.102281s)][1.66132 (0.172852s)][2.00045 (0.376559s)][1.96804 (0.53608s)][2.58521 (0.91127s)]]
-[[fixed_int][[*1] (0.0526074s)][[*1] (0.104045s)][[*1] (0.188237s)][1.32644 (0.361312s)][2.16146 (0.761903s)]]
-[[gmp_int][3.20265 (0.168483s)][1.83394 (0.190813s)][1.23446 (0.232371s)][[*1] (0.272392s)][[*1] (0.352494s)]]
-[[tommath_int][18.6829 (0.98286s)][10.7076 (1.11408s)][7.10542 (1.3375s)][7.21562 (1.96548s)][9.00151 (3.17298s)]]
-]
-[table Operator /(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][2.34699 (0.0522854s)][2.07114 (0.108782s)][3.64515 (0.240023s)][4.35917 (0.39506s)][5.07357 (0.711756s)]]
-[[fixed_int][[*1] (0.0222776s)][1.62759 (0.0854855s)][2.67744 (0.176302s)][3.83519 (0.347573s)][5.06558 (0.710635s)]]
-[[gmp_int][2.03488 (0.0453323s)][[*1] (0.0525228s)][[*1] (0.0658471s)][[*1] (0.0906272s)][[*1] (0.140287s)]]
-[[tommath_int][39.7943 (0.886522s)][17.1717 (0.901904s)][17.5103 (1.153s)][18.5434 (1.68054s)][20.8389 (2.92342s)]]
-]
-[table Operator <<
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][30.7178 (0.0166545s)][11.6314 (0.0196597s)][6.58232 (0.0240014s)][3.58466 (0.032593s)][2.63577 (0.053456s)]]
-[[fixed_int][[*1] (0.000542177s)][[*1] (0.00169023s)][[*1] (0.00364634s)][[*1] (0.00909235s)][1.02663 (0.0208209s)]]
-[[gmp_int][17.0103 (0.00922261s)][5.92058 (0.0100071s)][3.22238 (0.0117499s)][1.601 (0.0145569s)][[*1] (0.0202809s)]]
-[[tommath_int][36.9087 (0.0200111s)][18.6848 (0.0315817s)][10.4978 (0.0382785s)][4.9662 (0.0451545s)][3.30498 (0.0670281s)]]
-]
-[table Operator >>
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][18.5732 (0.0143805s)][8.1063 (0.0157968s)][5.24617 (0.0178114s)][2.54823 (0.0249415s)][2.66089 (0.0339107s)]]
-[[fixed_int][[*1] (0.000774259s)][[*1] (0.00194871s)][[*1] (0.00339513s)][1.02266 (0.0100095s)][1.56491 (0.0199434s)]]
-[[gmp_int][11.8578 (0.00918099s)][3.94746 (0.00769246s)][2.38089 (0.00808343s)][[*1] (0.00978776s)][[*1] (0.0127441s)]]
-[[tommath_int][161.257 (0.124855s)][70.5839 (0.137548s)][41.6211 (0.141309s)][15.4893 (0.151606s)][13.0869 (0.166781s)]]
-]
-[table Operator ^
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][11.7006 (0.020334s)][9.45127 (0.0247923s)][4.25917 (0.027153s)][2.6181 (0.033731s)][1.83807 (0.0457905s)]]
-[[fixed_int][[*1] (0.00173786s)][[*1] (0.00262317s)][[*1] (0.00637518s)][[*1] (0.0128838s)][1.06862 (0.0266218s)]]
-[[gmp_int][5.73448 (0.00996572s)][4.31745 (0.0113254s)][2.10455 (0.0134169s)][1.69395 (0.0218245s)][[*1] (0.0249122s)]]
-[[tommath_int][42.0554 (0.0730863s)][27.6109 (0.0724281s)][12.6344 (0.0805466s)][6.21806 (0.080112s)][3.84383 (0.0957583s)]]
-]
-[table Operator ^(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][18.4664 (0.0198061s)][16.651 (0.0210955s)][13.6981 (0.0237059s)][5.19536 (0.0270095s)][2.99916 (0.032137s)]]
-[[fixed_int][[*1] (0.00107255s)][[*1] (0.00126692s)][[*1] (0.0017306s)][[*1] (0.00519878s)][[*1] (0.0107153s)]]
-[[gmp_int][37.7363 (0.0404741s)][33.0195 (0.041833s)][24.6483 (0.0426564s)][8.81514 (0.045828s)][4.76527 (0.0510615s)]]
-[[tommath_int][235.542 (0.252631s)][199.864 (0.253212s)][147.197 (0.25474s)][49.864 (0.259232s)][25.2164 (0.270201s)]]
-]
-[table Operator gcd
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][9.7399 (1.72384s)][9.19332 (3.97787s)][4.5686 (9.44724s)][4.83474 (22.6824s)][5.90712 (59.7424s)]]
-[[fixed_int][3.92522 (0.694716s)][4.50085 (1.94748s)][2.75617 (5.69938s)][3.85301 (18.0766s)][7.11994 (72.0083s)]]
-[[gmp_int][[*1] (0.176988s)][[*1] (0.432692s)][[*1] (2.06786s)][[*1] (4.69155s)][[*1] (10.1136s)]]
-[[tommath_int][21.4948 (3.80432s)][16.8561 (7.29351s)][7.41497 (15.3331s)][6.8095 (31.9471s)][6.75432 (68.3106s)]]
-]
-[table Operator str
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][1.72192 (0.000380146s)][1.86502 (0.000693873s)][3.26065 (0.00192567s)][3.88275 (0.00489147s)][5.48576 (0.0150341s)]]
-[[fixed_int][[*1] (0.000220769s)][1.24704 (0.000463955s)][1.87086 (0.00110489s)][2.82227 (0.00355548s)][5.07444 (0.0139069s)]]
-[[gmp_int][1.52989 (0.000337753s)][[*1] (0.000372045s)][[*1] (0.000590578s)][[*1] (0.0012598s)][[*1] (0.00274057s)]]
-[[tommath_int][18.719 (0.00413258s)][22.9337 (0.00853237s)][36.8247 (0.0217479s)][44.7324 (0.0563537s)][68.3845 (0.187413s)]]
-]
-[table Operator |
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][11.7002 (0.0203489s)][9.3648 (0.0245406s)][4.30735 (0.0273651s)][2.64011 (0.0336779s)][1.89563 (0.0459271s)]]
-[[fixed_int][[*1] (0.00173919s)][[*1] (0.00262052s)][[*1] (0.00635312s)][[*1] (0.0127562s)][1.0981 (0.0266044s)]]
-[[gmp_int][5.36125 (0.00932423s)][4.04848 (0.0106091s)][2.02225 (0.0128476s)][1.65427 (0.0211022s)][[*1] (0.0242278s)]]
-[[tommath_int][41.2161 (0.0716826s)][27.2814 (0.0714914s)][11.7667 (0.074755s)][6.28141 (0.0801272s)][3.87606 (0.0939085s)]]
-]
-[table Operator |(int)
-[[Backend][64 Bits][128 Bits][256 Bits][512 Bits][1024 Bits]]
-[[cpp_int][17.7789 (0.0198498s)][16.5506 (0.0210111s)][13.8268 (0.0238206s)][5.30465 (0.0270701s)][3.00448 (0.0323199s)]]
-[[fixed_int][[*1] (0.00111648s)][[*1] (0.0012695s)][[*1] (0.00172278s)][[*1] (0.00510309s)][[*1] (0.0107572s)]]
-[[gmp_int][35.6305 (0.0397808s)][32.0847 (0.0407317s)][24.5808 (0.0423473s)][9.0158 (0.0460084s)][4.603 (0.0495155s)]]
-[[tommath_int][228.073 (0.254639s)][199.149 (0.25282s)][148.482 (0.255801s)][51.0429 (0.260477s)][24.899 (0.267844s)]]
-]
-[endsect]
+gmp_int 64 + 0.0168163
+gmp_int 64 - 0.0186614
+gmp_int 64 * 0.0117134
+gmp_int 64 / 0.169732
+gmp_int 64 str 0.000328882
+gmp_int 64 +(int)0.00662982
+gmp_int 64 -(int)0.00709197
+gmp_int 64 *(int)0.0088044
+gmp_int 64 /(int)0.0460225
+gmp_int 64 % 0.158198
+gmp_int 64 | 0.00933212
+gmp_int 64 & 0.00941153
+gmp_int 64 ^ 0.0100066
+gmp_int 64 << 0.00917854
+gmp_int 64 >> 0.00925083
+gmp_int 64 %(int)0.0280589
+gmp_int 64 |(int)0.0400043
+gmp_int 64 &(int)0.0417312
+gmp_int 64 ^(int)0.040751
+gmp_int 64 gcd 0.176467
+gmp_int 128 + 0.0178204
+gmp_int 128 - 0.0189183
+gmp_int 128 * 0.0162167
+gmp_int 128 / 0.188989
+gmp_int 128 str 0.00036981
+gmp_int 128 +(int)0.00848453
+gmp_int 128 -(int)0.00871131
+gmp_int 128 *(int)0.0113603
+gmp_int 128 /(int)0.0532432
+gmp_int 128 % 0.156838
+gmp_int 128 | 0.0106143
+gmp_int 128 & 0.0112662
+gmp_int 128 ^ 0.0113
+gmp_int 128 << 0.0100873
+gmp_int 128 >> 0.0078452
+gmp_int 128 %(int)0.0347183
+gmp_int 128 |(int)0.0411793
+gmp_int 128 &(int)0.0429282
+gmp_int 128 ^(int)0.0423867
+gmp_int 128 gcd 0.433341
+gmp_int 256 + 0.0227099
+gmp_int 256 - 0.0253696
+gmp_int 256 * 0.0419669
+gmp_int 256 / 0.231062
+gmp_int 256 str 0.00059791
+gmp_int 256 +(int)0.011126
+gmp_int 256 -(int)0.0118753
+gmp_int 256 *(int)0.0134931
+gmp_int 256 /(int)0.0656163
+gmp_int 256 % 0.188537
+gmp_int 256 | 0.0128192
+gmp_int 256 & 0.0127349
+gmp_int 256 ^ 0.0133922
+gmp_int 256 << 0.0118988
+gmp_int 256 >> 0.00811877
+gmp_int 256 %(int)0.0471091
+gmp_int 256 |(int)0.042799
+gmp_int 256 &(int)0.0458343
+gmp_int 256 ^(int)0.043002
+gmp_int 256 gcd 2.06647
+gmp_int 512 + 0.0273102
+gmp_int 512 - 0.0317526
+gmp_int 512 * 0.0977565
+gmp_int 512 / 0.271981
+gmp_int 512 str 0.0012591
+gmp_int 512 +(int)0.0141478
+gmp_int 512 -(int)0.0148129
+gmp_int 512 *(int)0.0180329
+gmp_int 512 /(int)0.0904515
+gmp_int 512 % 0.22083
+gmp_int 512 | 0.020649
+gmp_int 512 & 0.0165353
+gmp_int 512 ^ 0.0222088
+gmp_int 512 << 0.0146297
+gmp_int 512 >> 0.0098618
+gmp_int 512 %(int)0.0601431
+gmp_int 512 |(int)0.0461385
+gmp_int 512 &(int)0.0469244
+gmp_int 512 ^(int)0.0460041
+gmp_int 512 gcd 4.68119
+gmp_int 1024 + 0.0392733
+gmp_int 1024 - 0.0423657
+gmp_int 1024 * 0.314956
+gmp_int 1024 / 0.351788
+gmp_int 1024 str 0.00268616
+gmp_int 1024 +(int)0.0187891
+gmp_int 1024 -(int)0.0194118
+gmp_int 1024 *(int)0.0259443
+gmp_int 1024 /(int)0.140347
+gmp_int 1024 % 0.283657
+gmp_int 1024 | 0.0242247
+gmp_int 1024 & 0.023592
+gmp_int 1024 ^ 0.0249
+gmp_int 1024 << 0.0204313
+gmp_int 1024 >> 0.0128395
+gmp_int 1024 %(int)0.0758694
+gmp_int 1024 |(int)0.0495895
+gmp_int 1024 &(int)0.0506897
+gmp_int 1024 ^(int)0.049433
+gmp_int 1024 gcd 10.1293
+cpp_int(fixed) 128 + 0.0181676
+cpp_int(fixed) 128 - 0.0184343
+cpp_int(fixed) 128 * 0.014376
+cpp_int(fixed) 128 / 0.202558
+cpp_int(fixed) 128 str 0.000652736
+cpp_int(fixed) 128 +(int)0.00948536
+cpp_int(fixed) 128 -(int)0.00886251
+cpp_int(fixed) 128 *(int)0.0173963
+cpp_int(fixed) 128 /(int)0.106251
+cpp_int(fixed) 128 % 0.20362
+cpp_int(fixed) 128 | 0.0137212
+cpp_int(fixed) 128 & 0.0144157
+cpp_int(fixed) 128 ^ 0.0137219
+cpp_int(fixed) 128 << 0.0125872
+cpp_int(fixed) 128 >> 0.00905059
+cpp_int(fixed) 128 %(int)0.109447
+cpp_int(fixed) 128 |(int)0.014533
+cpp_int(fixed) 128 &(int)0.0162133
+cpp_int(fixed) 128 ^(int)0.0131589
+cpp_int(fixed) 128 gcd 2.86508
+cpp_int(fixed) 256 + 0.0216349
+cpp_int(fixed) 256 - 0.0208758
+cpp_int(fixed) 256 * 0.0210219

Modified: sandbox/big_number/libs/multiprecision/performance/performance_test.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/performance/performance_test.cpp (original)
+++ sandbox/big_number/libs/multiprecision/performance/performance_test.cpp 2012-03-08 12:54:28 EST (Thu, 08 Mar 2012)
@@ -582,12 +582,13 @@
    test<boost::multiprecision::mpz_int>("gmp_int", 1024);
 #endif
 #ifdef TEST_CPP_INT
+/*
    test<boost::multiprecision::cpp_int>("cpp_int", 64);
    test<boost::multiprecision::cpp_int>("cpp_int", 128);
    test<boost::multiprecision::cpp_int>("cpp_int", 256);
    test<boost::multiprecision::cpp_int>("cpp_int", 512);
    test<boost::multiprecision::cpp_int>("cpp_int", 1024);
-
+*/
    test<boost::multiprecision::mp_number<boost::multiprecision::cpp_int_backend<128, true, void> > >("cpp_int(fixed)", 128);
    test<boost::multiprecision::mp_number<boost::multiprecision::cpp_int_backend<256, true, void> > >("cpp_int(fixed)", 256);
    test<boost::multiprecision::mp_number<boost::multiprecision::cpp_int_backend<512, true, void> > >("cpp_int(fixed)", 512);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk