ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] [parameter] efficiency testing
by David Abrahams other posts by this author
Sep 12 2005 9:48AM messages near this date
[boost] Boost regression notification (2005-09-12 [HEAD]) | Re: [boost] read_write_mutex on win32 (was: read_write_mutexfundamentally broken in 1.33?)
SOURCE 
Last week, we were considering using the parameter library in some
client software that demands high performance (they are doing
massively parallel statistical analysis), so I sat with Matthias
Troyer, an expert in high-performance C++, and developed the test
that's now checked in at libs/parameter/test/efficiency.cpp.  The test
was carefully designed to avoid deceptive effects due to dead code
elimination, constant propagation, and CPU architecture, and the
process of developing it was highly instructive to me personally.  We
left lots of comments in the code so I'd be able to remember the
issuse involved.  I recommend reviewing it for anyone interested in
how to measure abstraction penalty.  One set of results is checked in
at libs/parameter/test/timings.txt, and are reproduced below.

As you can see, at least on that platform, you don't need to worry
about Boost.Parameter slowing your code down; it might even speed your
code up!

We'd be very interested in seeing results produced with other
compilers and/or platforms at the highest optimization levels.


----------------- Test #1 ----------------
Testers: 
  Matthias Troyer, Michael Gauckler, David Abrahams

Date:
  2005-09-09

Compiler: 
  Cygwin g++-4.0.0

Command lines:
  g++ -c -o efficiency.o -ftemplate-depth-100 -funroll-loops       -O3 -finline-functions -W
no-inline -DNDEBUG  efficiency.cpp

  g++ -o efficiency.exe efficiency.o -Wl,--strip-all  

  efficiency && efficiency && efficiency

Machine:
  Dell Inspiron 9300
  Intel(R) Pentium(R) M processor 2.00GHz
  Running on 230 volts AC power

Timings:
  Run #1 results discarded per standard practice

  Run #2
  plain time: 0.75
  named parameter time: 0.734

  Run #3
  plain time: 0.781
  named parameter time: 0.766

-----------------------------------------


-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved