Boost logo

Boost Users :

From: divyank shukla (divyank_s_at_[hidden])
Date: 2006-08-01 01:23:03


Please refer to the document :

"http://citeseer.ist.psu.edu/striegnitz00expression.html"

----snip-------

We measured the time to add four instances of Vec3 by
using these methods:

loop: we manually coded a loop that iterates through
the vector components and performs the
addition, expression templates: we simply wrote
 e = a + b + c + d, were a - e are all of type Vec3
and let PETE do necessary optimizations,

lambda function: we used lambda(w,x,y,z, w + x + y +
z)(a,b,c,d).

All those expression were evaluated fifty million
times
 on a SunUltra 10 with a 333MHz
UltraSparcIIi processor. We used Kuck and
Associates’
KCC version 4.0 with either SUN’s C 5.0
or Gnu’s C 2.95.2 as possible backend C compiler.
Furthermore, we investigated GNU’s C++ compiler
2.95.2.

loop:5.59 secs
expr template: 18.37 secs
lambda expression: 36.44 sec

------snip------

regards
  divyank

--- Sohail Somani <s.somani_at_[hidden]> wrote:

> > -----Original Message-----
> > From: boost-users-bounces_at_[hidden]
> > [mailto:boost-users-bounces_at_[hidden]] On
> Behalf Of
> > divyank shukla
> > Sent: Monday, July 31, 2006 8:06 AM
> > To: boost-users_at_[hidden]
> > Subject: [Boost-users] performance of template
> expression
> >
> > snip....
> >
> > My question is does the performance penalty still
> > exist with g++(4.1) compilers as against
> boost::lambda
> > functions.
>
> Where are your performance results (hard numbers)?
> Have you measured
> them as compared to the rest of your algorithm? For
> example, if you do
> the general QR decomposition, chances are that's
> going to be the slow
> part.
>
> One should usually profile after coding, rather than
> optimizing
> prematurely. Generally it's the algorithm that is
> slow.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
>
http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net