$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Eric Ford (eford_at_[hidden])
Date: 2001-09-08 17:51:37
In case anyone has downloaded my code, but not looked at it much, I've
revised the code at
http://www.astro.princeton.edu/~eford/math/interface/ .  
Changes:
It now uses call_traits to optimize parameter passing.
Checkers now use static member functions when possible.
Both these changes should help for optimizations' sake.
Observations on optimizability:
I did some timing using linux/g++ 2.95 on a celeron.
There appears to be no overhead for calling the example funciton
square compared to using x*x.  
According to the tuple documentation, the only overhead is from
returning a tuple: an extra creation and assignment for each element
of a tuple.  And even this can sometimes be optimized out with KAI. 
(Hopefully it's only a matter of time before most compilers perform
this optimization.)  If you have a big data structure, then you might
want to use a smart pointer inside the tuple.  Similarly, for
returning a significant number of values of the same type, an array
would probably be better than a tuple.  I'd say it sounds like, except
in extreme cases, returning two or three values in a tuple is probably
not too big of a performance penalty.