Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54888 - sandbox/numeric_adaptor/libs/numeric_adaptor/test/perf
From: barend.gehrels_at_[hidden]
Date: 2009-07-11 08:48:44


Author: barendgehrels
Date: 2009-07-11 08:48:44 EDT (Sat, 11 Jul 2009)
New Revision: 54888
URL: http://svn.boost.org/trac/boost/changeset/54888

Log:
Updated performance test
Text files modified:
   sandbox/numeric_adaptor/libs/numeric_adaptor/test/perf/perf.cpp | 15 ++++++++-------
   1 files changed, 8 insertions(+), 7 deletions(-)

Modified: sandbox/numeric_adaptor/libs/numeric_adaptor/test/perf/perf.cpp
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/test/perf/perf.cpp (original)
+++ sandbox/numeric_adaptor/libs/numeric_adaptor/test/perf/perf.cpp 2009-07-11 08:48:44 EDT (Sat, 11 Jul 2009)
@@ -34,7 +34,7 @@
     num b(tb);
     num c(tc);
     num s = (a + b + c) / num(2.0);
- return T(num::sqrt(s * (s - a) * (s - b) * (s - c)));
+ return sqrt(s * (s - a) * (s - b) * (s - c));
 }
 
 
@@ -48,15 +48,16 @@
 
 int main()
 {
- //long long int n = 1000000000;
- long long int n = 1000000;
+ typedef unsigned long long int long_type;
+ long_type n = 4000000000U;
+ //long_type n = 1000000;
     try
     {
         {
             boost::timer t;
 
             double s = 0;
- for (long long int i = 0; i < n; i++)
+ for (long_type i = 0; i < n; i++)
             {
                 s += heron<double, ieee_policy<double> >(31622.77662, 0.000023, 31622.77661);
             }
@@ -67,7 +68,7 @@
             boost::timer t;
 
             double s = 0;
- for (long long int i = 0; i < n; i++)
+ for (long_type i = 0; i < n; i++)
             {
                 s += heron_direct<double>(31622.77662, 0.000023, 31622.77661);
             }
@@ -82,7 +83,7 @@
             boost::timer t;
 
             double s = 0;
- for (long long int i = 0; i < n; i++)
+ for (long_type i = 0; i < n; i++)
             {
                 s += heron<double, cln_policy>(31622.77662, 0.000023, 31622.77661);
             }
@@ -95,7 +96,7 @@
             boost::timer t;
 
             double s = 0;
- for (long long int i = 0; i < n; i++)
+ for (long_type i = 0; i < n; i++)
             {
                 //s += heron<double, gmp_policy>(31622.77662, 0.000023, 31622.77661);
             }


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