Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68872 - in trunk: boost/random libs/random/doc libs/random/performance
From: steven_at_[hidden]
Date: 2011-02-14 16:31:16


Author: steven_watanabe
Date: 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
New Revision: 68872
URL: http://svn.boost.org/trac/boost/changeset/68872

Log:
Update performance numbers.
Added:
   trunk/libs/random/performance/Jamfile.v2 (contents, props changed)
Text files modified:
   trunk/boost/random/random_device.hpp | 13 ++-
   trunk/libs/random/doc/distribution_performance_linux.qbk | 41 +++++++------
   trunk/libs/random/doc/distribution_performance_windows.qbk | 41 +++++++------
   trunk/libs/random/doc/generator_performance_linux.qbk | 73 +++++++++++-------------
   trunk/libs/random/doc/generator_performance_windows.qbk | 72 +++++++++++-------------
   trunk/libs/random/doc/generators.qbk | 8 +-
   trunk/libs/random/doc/performance.qbk | 8 +-
   trunk/libs/random/doc/performance_data.qbk | 73 +++++++++++-------------
   trunk/libs/random/performance/generate_table.cpp | 22 +++++-
   trunk/libs/random/performance/nondet_random_speed.cpp | 12 +--
   trunk/libs/random/performance/random_speed.cpp | 116 +++++++++++++++------------------------
   11 files changed, 226 insertions(+), 253 deletions(-)

Modified: trunk/boost/random/random_device.hpp
==============================================================================
--- trunk/boost/random/random_device.hpp (original)
+++ trunk/boost/random/random_device.hpp 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -71,13 +71,16 @@
  *
  * The test program <a href="\boost/libs/random/performance/nondet_random_speed.cpp">
  * nondet_random_speed.cpp</a> measures the execution times of the
- * nondet_random.hpp implementation of the above algorithms in a tight
- * loop. The performance has been evaluated on a Pentium Pro 200 MHz
- * with gcc 2.95.2, Linux 2.2.13, glibc 2.1.2.
+ * random_device.hpp implementation of the above algorithms in a tight
+ * loop. The performance has been evaluated on an
+ * Intel(R) Core(TM) i7 CPU Q 840 \@ 1.87GHz, 1867 Mhz with
+ * Visual C++ 2010, Microsoft Windows 7 Professional and with gcc 4.4.5,
+ * Ubuntu Linux 2.6.35-25-generic.
  *
  * <table cols="2">
- * <tr><th>class</th><th>time per invocation [usec]</th></tr>
- * <tr><td> \random_device </td><td>92.0</td></tr>
+ * <tr><th>Platform</th><th>time per invocation [microseconds]</th></tr>
+ * <tr><td> Windows </td><td>2.9</td></tr>
+ * <tr><td> Linux </td><td>1.7</td></tr>
  * </table>
  *
  * The measurement error is estimated at +/- 1 usec.

Modified: trunk/libs/random/doc/distribution_performance_linux.qbk
==============================================================================
--- trunk/libs/random/doc/distribution_performance_linux.qbk (original)
+++ trunk/libs/random/doc/distribution_performance_linux.qbk 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -1,23 +1,24 @@
-[/
- / Copyright (c) 2009 Steven Watanabe
- /
- / Distributed under the Boost Software License, Version 1.0. (See
- / accompanying file LICENSE_1_0.txt or copy at
- / http://www.boost.org/LICENSE_1_0.txt)
-]
-
 [table Distributions (Linux)
   [[\[M rn/sec\]][minstd_rand][kreutzer1986][mt19937][lagged_fibonacci607]]
- [[uniform_int][31.25][30.581][11.5607][16.0514]]
- [[geometric][5.20833][6.66223][6.68449][6.73854]]
- [[binomial][5.01505][21.7865][4.38982][10.9529]]
- [[poisson][22.8311][22.1729][20.8768][24.3902]]
- [[uniform_real][18.2815][84.0336][67.1141][72.4638]]
- [[triangle][13.2802][33.4448][33.67][36.4964]]
- [[exponential][6.19195][8.49618][8.2713][8.65052]]
- [[normal polar][5.78369][6.56599][6.49773][6.48508]]
- [[lognormal][4.13565][4.53515][4.51467][4.57875]]
- [[cauchy][6.07533][7.92393][7.77605][8.35422]]
- [[gamma][6.07533][7.92393][7.83085][8.34725]]
- [[uniform_on_sphere][1.43472][1.62075][1.5625][1.5949]]
+ [[uniform_int][16.2338][48.7805][21.5517][23.8663]]
+ [[uniform_smallint][18.9036][114.943][25.3165][74.6269]]
+ [[bernoulli][21.322][85.4701][23.2558][125]]
+ [[geometric][9.42507][11.7925][7.38007][15.528]]
+ [[binomial][13.4953][29.7619][12.7877][38.7597]]
+ [[negative_binomial][1.69549][2.29305][1.65563][2.45098]]
+ [[poisson][13.7552][34.1297][13.369][43.8596]]
+ [[uniform_real][18.2815][44.4444][19.8413][119.048]]
+ [[uniform_01][21.692][72.4638][17.1233][116.279]]
+ [[triangle][15.2207][29.3255][11.9904][51.2821]]
+ [[exponential][10.5374][17.0068][10.8814][22.2222]]
+ [[normal polar][8.82613][12.9199][9.00901][14.771]]
+ [[lognormal][6.15764][7.50188][5.68182][8.61326]]
+ [[chi squared][2.07297][2.8401][2.10926][3.07409]]
+ [[cauchy][9.18274][14.8368][7.37463][17.3913]]
+ [[fisher f][1.04646][1.47449][1.08026][1.61186]]
+ [[student t][1.60927][2.18245][1.65207][2.34192]]
+ [[gamma][2.1097][2.87439][2.13538][3.01296]]
+ [[weibull][4.73709][5.77367][4.20521][6.33312]]
+ [[extreme value][7.40192][10.101][6.23441][11.5741]]
+ [[uniform_on_sphere][2.22222][2.78552][2.28311][2.7933]]
 ]

Modified: trunk/libs/random/doc/distribution_performance_windows.qbk
==============================================================================
--- trunk/libs/random/doc/distribution_performance_windows.qbk (original)
+++ trunk/libs/random/doc/distribution_performance_windows.qbk 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -1,23 +1,24 @@
-[/
- / Copyright (c) 2009 Steven Watanabe
- /
- / Distributed under the Boost Software License, Version 1.0. (See
- / accompanying file LICENSE_1_0.txt or copy at
- / http://www.boost.org/LICENSE_1_0.txt)
-]
-
 [table Distributions (Windows)
   [[\[M rn/sec\]][minstd_rand][kreutzer1986][mt19937][lagged_fibonacci607]]
- [[uniform_int][14.7449][27.465][6.65292][28.5714]]
- [[geometric][7.10328][5.53649][3.73622][9.38438]]
- [[binomial][6.20155][5.78135][2.65118][4.65463]]
- [[poisson][15.9617][8.77886][12.5486][17.9276]]
- [[uniform_real][49.6032][27.1223][31.6857][60.35]]
- [[triangle][21.3356][11.7][14.2857][22.3015]]
- [[exponential][14.3493][6.05473][10.8472][12.982]]
- [[normal polar][4.24394][2.75748][7.04871][6.09533]]
- [[lognormal][3.30066][1.34822][5.36913][4.0024]]
- [[cauchy][11.4286][2.92372][12.0525][7.55629]]
- [[gamma][10.5263][3.72523][12.1433][5.87682]]
- [[uniform_on_sphere][0.680874][0.38004][1.18737][0.486334]]
+ [[uniform_int][27.049][79.1139][29.8151][34.8432]]
+ [[uniform_smallint][31.736][90.3342][33.9213][59.9161]]
+ [[bernoulli][25.641][56.2114][27.049][62.8141]]
+ [[geometric][12.8717][18.9645][14.6671][18.5805]]
+ [[binomial][18.2116][32.2165][19.8491][29.4118]]
+ [[negative_binomial][2.79065][3.99138][2.73358][3.72898]]
+ [[poisson][20.0321][37.7074][18.9645][36.4299]]
+ [[uniform_real][27.6319][78.1861][26.4901][71.2251]]
+ [[uniform_01][36.63][95.6938][26.3783][85.4701]]
+ [[triangle][19.4856][43.8982][19.425][36.8324]]
+ [[exponential][17.0474][32.0513][18.005][28.6205]]
+ [[normal polar][14.4051][19.7863][13.1354][20.7426]]
+ [[lognormal][10.8472][13.6968][10.3563][13.7855]]
+ [[chi squared][3.53957][4.95][3.44448][4.83442]]
+ [[cauchy][15.1906][23.5682][14.9768][23.31]]
+ [[fisher f][1.74951][2.45417][1.69854][2.38743]]
+ [[student t][2.63151][3.75291][2.53872][3.51432]]
+ [[gamma][3.50275][4.9729][3.35087][4.75195]]
+ [[weibull][8.96539][11.9161][9.09256][11.6754]]
+ [[extreme value][12.3274][18.4196][12.5945][17.5623]]
+ [[uniform_on_sphere][2.83688][3.58038][2.73898][3.60101]]
 ]

Modified: trunk/libs/random/doc/generator_performance_linux.qbk
==============================================================================
--- trunk/libs/random/doc/generator_performance_linux.qbk (original)
+++ trunk/libs/random/doc/generator_performance_linux.qbk 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -1,42 +1,37 @@
-[/
- / Copyright (c) 2009 Steven Watanabe
- /
- / Distributed under the Boost Software License, Version 1.0. (See
- / accompanying file LICENSE_1_0.txt or copy at
- / http://www.boost.org/LICENSE_1_0.txt)
-]
-
 [table Basic Generators (Linux)
   [[generator] [M rn/sec] [time per random number \[nsec\]] [relative speed compared to fastest \[percent\]]]
- [[rand48][312.5][3.2][100%]]
- [[lrand48 run-time][303.03][3.3][96%]]
- [[lrand48 (C library)][67.5676][14.8][21%]]
- [[minstd_rand0][96.1538][10.4][30%]]
- [[minstd_rand][93.4579][10.7][29%]]
- [[ecuyer combined][60.6061][16.5][19%]]
- [[kreutzer1986][97.0874][10.3][31%]]
- [[taus88][243.902][4.1][78%]]
- [[hellekalek1995 (inversive)][2.405][415.8][0%]]
- [[mt11213b][138.889][7.2][44%]]
- [[mt19937][138.889][7.2][44%]]
- [[lagged_fibonacci607][81.9672][12.2][26%]]
- [[lagged_fibonacci1279][81.9672][12.2][26%]]
- [[lagged_fibonacci2281][81.9672][12.2][26%]]
- [[lagged_fibonacci3217][81.3008][12.3][26%]]
- [[lagged_fibonacci4423][80.6452][12.4][25%]]
- [[lagged_fibonacci9689][80.6452][12.4][25%]]
- [[lagged_fibonacci19937][80][12.5][25%]]
- [[lagged_fibonacci23209][80.6452][12.4][25%]]
- [[lagged_fibonacci44497][79.3651][12.6][25%]]
- [[subtract_with_carry][76.9231][13][24%]]
- [[subtract_with_carry_01][45.045][22.2][14%]]
- [[ranlux3][8.78735][113.8][2%]]
- [[ranlux4][5.11771][195.4][1%]]
- [[ranlux3_01][5.29381][188.9][1%]]
- [[ranlux4_01][3.04599][328.3][0%]]
- [[ranlux64_3][8.74126][114.4][2%]]
- [[ranlux64_4][5.09684][196.2][1%]]
- [[ranlux64_3_01][5.30786][188.4][1%]]
- [[ranlux64_4_01][3.02847][330.2][0%]]
- [[mt19937ar.c][95.2381][10.5][30%]]
+ [[rand48][149.254][6.7][59%]]
+ [[lrand48 run-time][158.73][6.3][63%]]
+ [[minstd_rand0][22.9885][43.5][9%]]
+ [[minstd_rand][22.0751][45.3][8%]]
+ [[ecuyer combined][42.735][23.4][17%]]
+ [[kreutzer1986][151.515][6.6][60%]]
+ [[taus88][250][4][100%]]
+ [[knuth_b][19.6078][51][7%]]
+ [[hellekalek1995 (inversive)][4.54545][220][1%]]
+ [[mt11213b][204.082][4.9][81%]]
+ [[mt19937][204.082][4.9][81%]]
+ [[mt19937_64][60.6061][16.5][24%]]
+ [[lagged_fibonacci607][126.582][7.9][50%]]
+ [[lagged_fibonacci1279][129.87][7.7][51%]]
+ [[lagged_fibonacci2281][129.87][7.7][51%]]
+ [[lagged_fibonacci3217][131.579][7.6][52%]]
+ [[lagged_fibonacci4423][128.205][7.8][51%]]
+ [[lagged_fibonacci9689][128.205][7.8][51%]]
+ [[lagged_fibonacci19937][131.579][7.6][52%]]
+ [[lagged_fibonacci23209][131.579][7.6][52%]]
+ [[lagged_fibonacci44497][131.579][7.6][52%]]
+ [[subtract_with_carry][147.059][6.8][58%]]
+ [[subtract_with_carry_01][105.263][9.5][42%]]
+ [[ranlux3][15.748][63.5][6%]]
+ [[ranlux4][9.11577][109.7][3%]]
+ [[ranlux3_01][10.5708][94.6][4%]]
+ [[ranlux4_01][6.27353][159.4][2%]]
+ [[ranlux64_3][15.8983][62.9][6%]]
+ [[ranlux64_4][9.14913][109.3][3%]]
+ [[ranlux64_3_01][10.9409][91.4][4%]]
+ [[ranlux64_4_01][6.32911][158][2%]]
+ [[ranlux24][15.1976][65.8][6%]]
+ [[ranlux48][8.88099][112.6][3%]]
+ [[mt19937ar.c][111.111][9][44%]]
 ]

Modified: trunk/libs/random/doc/generator_performance_windows.qbk
==============================================================================
--- trunk/libs/random/doc/generator_performance_windows.qbk (original)
+++ trunk/libs/random/doc/generator_performance_windows.qbk 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -1,41 +1,37 @@
-[/
- / Copyright (c) 2009 Steven Watanabe
- /
- / Distributed under the Boost Software License, Version 1.0. (See
- / accompanying file LICENSE_1_0.txt or copy at
- / http://www.boost.org/LICENSE_1_0.txt)
-]
-
 [table Basic Generators (Windows)
   [[generator] [M rn/sec] [time per random number \[nsec\]] [relative speed compared to fastest \[percent\]]]
- [[rand48][98.5222][10.15][67%]]
- [[lrand48 run-time][17.343][57.66][11%]]
- [[minstd_rand0][46.3822][21.56][31%]]
- [[minstd_rand][38.5505][25.94][26%]]
- [[ecuyer combined][15.8028][63.28][10%]]
- [[kreutzer1986][66.6667][15][45%]]
- [[taus88][145.56][6.87][100%]]
- [[hellekalek1995 (inversive)][4.26658][234.38][2%]]
- [[mt11213b][139.082][7.19][95%]]
- [[mt19937][142.248][7.03][97%]]
- [[lagged_fibonacci607][61.5385][16.25][42%]]
- [[lagged_fibonacci1279][58.7199][17.03][40%]]
- [[lagged_fibonacci2281][64.0205][15.62][43%]]
- [[lagged_fibonacci3217][62.1118][16.1][42%]]
- [[lagged_fibonacci4423][63.3714][15.78][43%]]
- [[lagged_fibonacci9689][64.6412][15.47][44%]]
- [[lagged_fibonacci19937][63.3714][15.78][43%]]
- [[lagged_fibonacci23209][64.6412][15.47][44%]]
- [[lagged_fibonacci44497][64.0205][15.62][43%]]
- [[subtract_with_carry][92.7644][10.78][63%]]
- [[subtract_with_carry_01][78.0031][12.82][53%]]
- [[ranlux3][9.86193][101.4][6%]]
- [[ranlux4][5.80754][172.19][3%]]
- [[ranlux3_01][7.15103][139.84][4%]]
- [[ranlux4_01][3.8345][260.79][2%]]
- [[ranlux64_3][9.10415][109.84][6%]]
- [[ranlux64_4][5.05919][197.66][3%]]
- [[ranlux64_3_01][6.12445][163.28][4%]]
- [[ranlux64_4_01][3.39167][294.84][2%]]
- [[mt19937ar.c][125.471][7.97][86%]]
+ [[rand48][152.672][6.55][64%]]
+ [[lrand48 run-time][24.3724][41.03][10%]]
+ [[minstd_rand0][39.8248][25.11][16%]]
+ [[minstd_rand][39.0778][25.59][16%]]
+ [[ecuyer combined][16.7813][59.59][7%]]
+ [[kreutzer1986][89.0472][11.23][37%]]
+ [[taus88][237.53][4.21][100%]]
+ [[knuth_b][30.8166][32.45][12%]]
+ [[hellekalek1995 (inversive)][5.28457][189.23][2%]]
+ [[mt11213b][237.53][4.21][100%]]
+ [[mt19937][221.239][4.52][93%]]
+ [[mt19937_64][91.5751][10.92][38%]]
+ [[lagged_fibonacci607][142.45][7.02][59%]]
+ [[lagged_fibonacci1279][142.45][7.02][59%]]
+ [[lagged_fibonacci2281][145.56][6.87][61%]]
+ [[lagged_fibonacci3217][149.031][6.71][62%]]
+ [[lagged_fibonacci4423][142.45][7.02][59%]]
+ [[lagged_fibonacci9689][145.773][6.86][61%]]
+ [[lagged_fibonacci19937][142.45][7.02][59%]]
+ [[lagged_fibonacci23209][145.773][6.86][61%]]
+ [[lagged_fibonacci44497][142.45][7.02][59%]]
+ [[subtract_with_carry][136.24][7.34][57%]]
+ [[subtract_with_carry_01][90.3342][11.07][38%]]
+ [[ranlux3][13.1631][75.97][5%]]
+ [[ranlux4][7.60398][131.51][3%]]
+ [[ranlux3_01][8.62738][115.91][3%]]
+ [[ranlux4_01][4.99625][200.15][2%]]
+ [[ranlux64_3][13.1631][75.97][5%]]
+ [[ranlux64_4][7.5861][131.82][3%]]
+ [[ranlux64_3_01][8.63931][115.75][3%]]
+ [[ranlux64_4_01][5.01958][199.22][2%]]
+ [[ranlux24][13.1631][75.97][5%]]
+ [[ranlux48][7.5861][131.82][3%]]
+ [[mt19937ar.c][200.401][4.99][84%]]
 ]

Modified: trunk/libs/random/doc/generators.qbk
==============================================================================
--- trunk/libs/random/doc/generators.qbk (original)
+++ trunk/libs/random/doc/generators.qbk 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -47,13 +47,13 @@
   [[__minstd_rand] [2[sup 31]-2] [`sizeof(int32_t)`] [[minstd_rand_speed]] [-]]
   [[__rand48][2[sup 48]-1] [`sizeof(uint64_t)`] [[rand48_speed]] [-]]
   [[__ecuyer1988] [approx. 2[sup 61]] [`2*sizeof(int32_t)`] [[ecuyer_combined_speed]] [-]]
- [[__knuth_b] [?] [`257*sizeof(uint32_t)`] [] [-]]
+ [[__knuth_b] [?] [`257*sizeof(uint32_t)`] [[knuth_b_speed]] [-]]
   [[__kreutzer1986] [?] [`1368*sizeof(uint32_t)`] [[kreutzer1986_speed]] [-]]
   [[__taus88] [~2[sup 88]] [`3*sizeof(uint32_t)`] [[taus88_speed]] [-]]
   [[__hellekalek1995] [2[sup 31]-1] [`sizeof(int32_t)`] [[hellekalek1995__inversive__speed]] [good uniform distribution in several dimensions]]
   [[__mt11213b] [2[sup 11213]-1] [`352*sizeof(uint32_t)`] [[mt11213b_speed]] [good uniform distribution in up to 350 dimensions]]
   [[__mt19937] [2[sup 19937]-1] [`625*sizeof(uint32_t)`] [[mt19937_speed]] [good uniform distribution in up to 623 dimensions]]
- [[__mt19937_64] [2[sup 19937]-1] [`312*sizeof(uint64_t)`] [] [good uniform distribution in up to 311 dimensions]]
+ [[__mt19937_64] [2[sup 19937]-1] [`312*sizeof(uint64_t)`] [[mt19937_64_speed]] [good uniform distribution in up to 311 dimensions]]
   [[__lagged_fibonacci607] [~2[sup 32000]] [`607*sizeof(double)`] [[lagged_fibonacci607_speed]] [-]]
   [[__lagged_fibonacci1279] [~2[sup 67000]] [`1279*sizeof(double)`] [[lagged_fibonacci1279_speed]] [-]]
   [[__lagged_fibonacci2281] [~2[sup 120000]] [`2281*sizeof(double)`] [[lagged_fibonacci2281_speed]] [-]]
@@ -71,8 +71,8 @@
   [[__ranlux4_01] [~10[sup 171]] [`24*sizeof(float)`] [[ranlux4_speed]] [-]]
   [[__ranlux64_3_01] [~10[sup 171]] [`24*sizeof(double)`] [[ranlux64_3_speed]] [-]]
   [[__ranlux64_4_01] [~10[sup 171]] [`24*sizeof(double)`] [[ranlux64_4_speed]] [-]]
- [[__ranlux24] [~10[sup 171]] [`24*sizeof(uint32_t)`] [] [-]]
- [[__ranlux48] [~10[sup 171]] [`12*sizeof(uint64_t)`] [] [-]]
+ [[__ranlux24] [~10[sup 171]] [`24*sizeof(uint32_t)`] [[ranlux24_speed]] [-]]
+ [[__ranlux48] [~10[sup 171]] [`12*sizeof(uint64_t)`] [[ranlux48_speed]] [-]]
 ]
 
 As observable from the table, there is generally a quality/performance/memory

Modified: trunk/libs/random/doc/performance.qbk
==============================================================================
--- trunk/libs/random/doc/performance.qbk (original)
+++ trunk/libs/random/doc/performance.qbk 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -12,11 +12,9 @@
 the wide variety of generators and distributions available in the boost
 library.
 
-The performance has been evaluated on an Intel(R) Xeon(TM) MP
-CPU 3.66GHz, Gentoo Base System release 1.12.11.1, GCC 4.3.2,
-glibc 2.9 and on an Intel(R) Core(TM)2 CPU T7600
-_at_2.33 Ghz with Microsoft Windows XP Professional, Service Pack 2 Build
-2600, Microsoft Visual C++ 2008 9.0.21022.
+The performance has been evaluated on an Intel(R) Core(TM) i7
+CPU Q 840 @ 1.87GHz, 1867 Mhz with Visual C++ 2010, Microsoft
+Windows 7 Professional and with gcc 4.4.5, Ubuntu Linux 2.6.35-25-generic.
 The speed is reported in million random numbers
 per second (M rn/sec), generated in a tight loop.
 

Modified: trunk/libs/random/doc/performance_data.qbk
==============================================================================
--- trunk/libs/random/doc/performance_data.qbk (original)
+++ trunk/libs/random/doc/performance_data.qbk 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -1,39 +1,34 @@
-[/
- / Copyright (c) 2009 Steven Watanabe
- /
- / Distributed under the Boost Software License, Version 1.0. (See
- / accompanying file LICENSE_1_0.txt or copy at
- / http://www.boost.org/LICENSE_1_0.txt)
-]
-
-[template rand48_speed[] 100%]
-[template lrand48_run_time_speed[] 96%]
-[template lrand48__C_library__speed[] 21%]
-[template minstd_rand0_speed[] 30%]
-[template minstd_rand_speed[] 29%]
-[template ecuyer_combined_speed[] 19%]
-[template kreutzer1986_speed[] 31%]
-[template taus88_speed[] 78%]
-[template hellekalek1995__inversive__speed[] 0%]
-[template mt11213b_speed[] 44%]
-[template mt19937_speed[] 44%]
-[template lagged_fibonacci607_speed[] 26%]
-[template lagged_fibonacci1279_speed[] 26%]
-[template lagged_fibonacci2281_speed[] 26%]
-[template lagged_fibonacci3217_speed[] 26%]
-[template lagged_fibonacci4423_speed[] 25%]
-[template lagged_fibonacci9689_speed[] 25%]
-[template lagged_fibonacci19937_speed[] 25%]
-[template lagged_fibonacci23209_speed[] 25%]
-[template lagged_fibonacci44497_speed[] 25%]
-[template subtract_with_carry_speed[] 24%]
-[template subtract_with_carry_01_speed[] 14%]
-[template ranlux3_speed[] 2%]
-[template ranlux4_speed[] 1%]
-[template ranlux3_01_speed[] 1%]
-[template ranlux4_01_speed[] 0%]
-[template ranlux64_3_speed[] 2%]
-[template ranlux64_4_speed[] 1%]
-[template ranlux64_3_01_speed[] 1%]
-[template ranlux64_4_01_speed[] 0%]
-[template mt19937ar_c_speed[] 30%]
+[template rand48_speed[] 64%]
+[template lrand48_run_time_speed[] 10%]
+[template minstd_rand0_speed[] 16%]
+[template minstd_rand_speed[] 16%]
+[template ecuyer_combined_speed[] 7%]
+[template kreutzer1986_speed[] 37%]
+[template taus88_speed[] 100%]
+[template knuth_b_speed[] 12%]
+[template hellekalek1995__inversive__speed[] 2%]
+[template mt11213b_speed[] 100%]
+[template mt19937_speed[] 93%]
+[template mt19937_64_speed[] 38%]
+[template lagged_fibonacci607_speed[] 59%]
+[template lagged_fibonacci1279_speed[] 59%]
+[template lagged_fibonacci2281_speed[] 61%]
+[template lagged_fibonacci3217_speed[] 62%]
+[template lagged_fibonacci4423_speed[] 59%]
+[template lagged_fibonacci9689_speed[] 61%]
+[template lagged_fibonacci19937_speed[] 59%]
+[template lagged_fibonacci23209_speed[] 61%]
+[template lagged_fibonacci44497_speed[] 59%]
+[template subtract_with_carry_speed[] 57%]
+[template subtract_with_carry_01_speed[] 38%]
+[template ranlux3_speed[] 5%]
+[template ranlux4_speed[] 3%]
+[template ranlux3_01_speed[] 3%]
+[template ranlux4_01_speed[] 2%]
+[template ranlux64_3_speed[] 5%]
+[template ranlux64_4_speed[] 3%]
+[template ranlux64_3_01_speed[] 3%]
+[template ranlux64_4_01_speed[] 2%]
+[template ranlux24_speed[] 5%]
+[template ranlux48_speed[] 3%]
+[template mt19937ar_c_speed[] 84%]

Added: trunk/libs/random/performance/Jamfile.v2
==============================================================================
--- (empty file)
+++ trunk/libs/random/performance/Jamfile.v2 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -0,0 +1,7 @@
+exe random_speed.exe : random_speed.cpp mt19937ar.c : release ;
+exe generate_table.exe : generate_table.cpp /boost//regex : <link>static ;
+exe nondet_random_speed.exe : nondet_random_speed.cpp /boost//random : release <link>static ;
+
+install random_speed : random_speed.exe : <install-type>EXE <location>. ;
+install nondet_random_speed : nondet_random_speed.exe : <install-type>EXE <location>. ;
+install generate_table : generate_table.exe : <install-type>EXE <location>. ;

Modified: trunk/libs/random/performance/generate_table.cpp
==============================================================================
--- trunk/libs/random/performance/generate_table.cpp (original)
+++ trunk/libs/random/performance/generate_table.cpp 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -43,7 +43,19 @@
>
> unique_list;
 
-int main() {
+int main(int argc, char** argv) {
+
+ std::string suffix;
+ std::string id;
+
+ if(argc >= 2 && std::strcmp(argv[1], "-linux") == 0) {
+ suffix = "linux";
+ id = "Linux";
+ } else {
+ suffix = "windows";
+ id = "Windows";
+ }
+
     std::vector<std::pair<std::string, double> > generator_info;
     std::string line;
     while(std::getline(std::cin, line)) {
@@ -63,8 +75,8 @@
     double min = std::min_element(generator_info.begin(), generator_info.end(), compare_second())->second;
 
     std::ofstream generator_defs("performance_data.qbk");
- std::ofstream generator_performance("generator_performance.qbk");
- generator_performance << "[table Basic Generators\n";
+ std::ofstream generator_performance(("generator_performance_" + suffix + ".qbk").c_str());
+ generator_performance << "[table Basic Generators (" << id << ")\n";
     generator_performance << " [[generator] [M rn/sec] [time per random number \\[nsec\\]] "
                              "[relative speed compared to fastest \\[percent\\]]]\n";
 
@@ -96,9 +108,9 @@
         }
     } while(std::getline(std::cin, line));
 
- std::ofstream distribution_performance("distribution_performance.qbk");
+ std::ofstream distribution_performance(("distribution_performance_" + suffix + ".qbk").c_str());
 
- distribution_performance << "[table Distributions\n";
+ distribution_performance << "[table Distributions (" << id << ")\n";
     distribution_performance << " [[\\[M rn/sec\\]]";
     BOOST_FOREACH(const std::string& generator, generator_names) {
         distribution_performance << boost::format("[%s]") % generator;

Modified: trunk/libs/random/performance/nondet_random_speed.cpp
==============================================================================
--- trunk/libs/random/performance/nondet_random_speed.cpp (original)
+++ trunk/libs/random/performance/nondet_random_speed.cpp 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -12,10 +12,10 @@
 #include <iostream>
 #include <string>
 #include <boost/timer.hpp>
-#include <boost/nondet_random.hpp>
+#include <boost/random/random_device.hpp>
 
-// set to your CPU frequency in MHz
-static const double cpu_frequency = 200 * 1e6;
+// set to your CPU frequency
+static const double cpu_frequency = 1.87 * 1e9;
 
 static void show_elapsed(double end, int iter, const std::string & name)
 {
@@ -53,12 +53,8 @@
 
   int iter = std::atoi(argv[1]);
 
-#ifdef __linux__
- boost::random_device dev;
+ boost::random::random_device dev;
   timing<unsigned int>(dev, iter, "random_device");
-#else
-#error The non-deterministic random device is currently available on Linux only.
-#endif
 
   return 0;
 }

Modified: trunk/libs/random/performance/random_speed.cpp
==============================================================================
--- trunk/libs/random/performance/random_speed.cpp (original)
+++ trunk/libs/random/performance/random_speed.cpp 2011-02-14 16:31:10 EST (Mon, 14 Feb 2011)
@@ -21,7 +21,7 @@
  */
 
 // define if your C library supports the non-standard drand48 family
-#define HAVE_DRAND48
+//#define HAVE_DRAND48
 
 // define if you have the original mt19937int.c (with commented out main())
 #undef HAVE_MT19937INT_C
@@ -29,8 +29,8 @@
 // define if you have the original mt19937ar.c (with commented out main())
 #define HAVE_MT19937AR_C
 
-// set to your CPU frequency in MHz
-static const double cpu_frequency = 3.66 * 1e9;
+// set to your CPU frequency
+static const double cpu_frequency = 1.87 * 1e9;
 
 /*
  * End of Configuration Section
@@ -244,98 +244,71 @@
 {
   Gen gen;
 
- timing(make_gen(gen, boost::uniform_int<>(-2, 4)),
+ timing(make_gen(gen, boost::random::uniform_int_distribution<>(-2, 4)),
          iter, name + " uniform_int");
 
- timing(make_gen(gen, boost::geometric_distribution<>(0.5)),
+ timing(make_gen(gen, boost::random::uniform_smallint<>(-2, 4)),
+ iter, name + " uniform_smallint");
+
+ timing(make_gen(gen, boost::random::bernoulli_distribution<>(0.5)),
+ iter, name + " bernoulli");
+
+ timing(make_gen(gen, boost::random::geometric_distribution<>(0.5)),
          iter, name + " geometric");
 
- timing(make_gen(gen, boost::binomial_distribution<int>(4, 0.8)),
+ timing(make_gen(gen, boost::random::binomial_distribution<int>(4, 0.8)),
          iter, name + " binomial");
 
- timing(make_gen(gen, boost::poisson_distribution<>(1)),
+ timing(make_gen(gen, boost::random::negative_binomial_distribution<int>(4, 0.8)),
+ iter, name + " negative_binomial");
+
+ timing(make_gen(gen, boost::random::poisson_distribution<>(1)),
          iter, name + " poisson");
 
 
- timing(make_gen(gen, boost::uniform_real<>(-5.3, 4.8)),
+ timing(make_gen(gen, boost::random::uniform_real_distribution<>(-5.3, 4.8)),
          iter, name + " uniform_real");
 
- timing(make_gen(gen, boost::triangle_distribution<>(1, 2, 7)),
+ timing(make_gen(gen, boost::random::uniform_01<>()),
+ iter, name + " uniform_01");
+
+ timing(make_gen(gen, boost::random::triangle_distribution<>(1, 2, 7)),
          iter, name + " triangle");
 
- timing(make_gen(gen, boost::exponential_distribution<>(3)),
+ timing(make_gen(gen, boost::random::exponential_distribution<>(3)),
          iter, name + " exponential");
 
- timing(make_gen(gen, boost::normal_distribution<>()),
+ timing(make_gen(gen, boost::random::normal_distribution<>()),
                   iter, name + " normal polar");
 
- timing(make_gen(gen, boost::lognormal_distribution<>()),
+ timing(make_gen(gen, boost::random::lognormal_distribution<>()),
          iter, name + " lognormal");
 
- timing(make_gen(gen, boost::cauchy_distribution<>()),
- iter, name + " cauchy");
-
- timing(make_gen(gen, boost::cauchy_distribution<>()),
- iter, name + " gamma");
-
- timing_sphere(make_gen(gen, boost::uniform_on_sphere<>(3)),
- iter/10, name + " uniform_on_sphere");
-}
-
-
-template<class URNG, class Dist>
-inline boost::shared_ptr<DynamicRandomGenerator<URNG, Dist> >
-make_dynamic(URNG & rng, const Dist& d)
-{
- typedef DynamicRandomGenerator<URNG, Dist> type;
- return boost::shared_ptr<type>(new type(rng, d));
-}
-
-template<class Gen>
-void distrib_runtime(int iter, const std::string & n, const Gen &)
-{
- std::string name = n + " virtual function ";
- Gen gen;
-
- GenericRandomGenerator<int> g_int;
-
- g_int.set(make_dynamic(gen, boost::uniform_int<>(-2,4)));
- timing(g_int, iter, name + "uniform_int");
-
- g_int.set(make_dynamic(gen, boost::geometric_distribution<>(0.5)));
- timing(g_int, iter, name + "geometric");
-
- g_int.set(make_dynamic(gen, boost::binomial_distribution<>(4, 0.8)));
- timing(g_int, iter, name + "binomial");
-
- g_int.set(make_dynamic(gen, boost::poisson_distribution<>(1)));
- timing(g_int, iter, name + "poisson");
+ timing(make_gen(gen, boost::random::chi_squared_distribution<>(4)),
+ iter, name + " chi squared");
 
- GenericRandomGenerator<double> g;
-
- g.set(make_dynamic(gen, boost::uniform_real<>(-5.3, 4.8)));
- timing(g, iter, name + "uniform_real");
+ timing(make_gen(gen, boost::random::cauchy_distribution<>()),
+ iter, name + " cauchy");
 
- g.set(make_dynamic(gen, boost::triangle_distribution<>(1, 2, 7)));
- timing(g, iter, name + "triangle");
+ timing(make_gen(gen, boost::random::fisher_f_distribution<>(4, 5)),
+ iter, name + " fisher f");
 
- g.set(make_dynamic(gen, boost::exponential_distribution<>(3)));
- timing(g, iter, name + "exponential");
+ timing(make_gen(gen, boost::random::student_t_distribution<>(7)),
+ iter, name + " student t");
 
- g.set(make_dynamic(gen, boost::normal_distribution<>()));
- timing(g, iter, name + "normal polar");
+ timing(make_gen(gen, boost::random::gamma_distribution<>(2.8)),
+ iter, name + " gamma");
 
- g.set(make_dynamic(gen, boost::lognormal_distribution<>()));
- timing(g, iter, name + "lognormal");
+ timing(make_gen(gen, boost::random::weibull_distribution<>(3)),
+ iter, name + " weibull");
 
- g.set(make_dynamic(gen, boost::cauchy_distribution<>()));
- timing(g, iter, name + "cauchy");
+ timing(make_gen(gen, boost::random::extreme_value_distribution<>()),
+ iter, name + " extreme value");
 
- g.set(make_dynamic(gen, boost::gamma_distribution<>(0.4)));
- timing(g, iter, name + "gamma");
+ timing_sphere(make_gen(gen, boost::random::uniform_on_sphere<>(3)),
+ iter/10, name + " uniform_on_sphere");
 }
 
-
 int main(int argc, char*argv[])
 {
   if(argc != 2) {
@@ -370,11 +343,15 @@
   run(iter, "ecuyer combined", boost::ecuyer1988());
   run(iter, "kreutzer1986", boost::kreutzer1986());
   run(iter, "taus88", boost::taus88());
+ run(iter, "knuth_b", boost::random::knuth_b());
 
   run(iter, "hellekalek1995 (inversive)", boost::hellekalek1995());
 
   run(iter, "mt11213b", boost::mt11213b());
   run(iter, "mt19937", boost::mt19937());
+#if !defined(BOOST_NO_INT64_T)
+ run(iter, "mt19937_64", boost::mt19937_64());
+#endif
 
   run(iter, "lagged_fibonacci607", boost::lagged_fibonacci607());
   run(iter, "lagged_fibonacci1279", boost::lagged_fibonacci1279());
@@ -396,6 +373,8 @@
   run(iter, "ranlux64_4", boost::ranlux4());
   run(iter, "ranlux64_3_01", boost::ranlux3_01());
   run(iter, "ranlux64_4_01", boost::ranlux4_01());
+ run(iter, "ranlux24", boost::ranlux3());
+ run(iter, "ranlux48", boost::ranlux4());
 
   run(iter, "counting", counting());
 
@@ -409,7 +388,6 @@
 #endif
 
   distrib(iter, "counting", counting());
- distrib_runtime(iter, "counting", counting());
 
   distrib(iter, "minstd_rand", boost::minstd_rand());
 
@@ -418,6 +396,4 @@
   distrib(iter, "mt19937", boost::mt19937());
   
   distrib(iter, "lagged_fibonacci607", boost::lagged_fibonacci607());
-
- distrib_runtime(iter, "mt19937", boost::mt19937());
 }


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