[std-interval] C++ interval std

Guillaume Melquiond guillaume.melquiond at ens-lyon.fr
Thu Apr 6 13:41:47 PDT 2006


Le jeudi 06 avril 2006 à 02:19 -0700, Steve Clamage a écrit :
> The Interval class is the one posted by Alan Eliasen,
> except that I removed the tag member from the Interval class,
> leaving only 2 doubles.
> 
> In the compiled code, all the Interval functions were inlined,
> so there are no calls to the functions. Here are two extracts
> from the source code, along with the generated amd64 code.

If all the functions are inlined, you are not testing which argument
passing method is the best one for your architecture. You are only
testing whether the compiler is good enough to produce optimal assembly
in both cases, since no information is hidden behind function call. The
answer seems to be "no" for your compiler (SunCC?).

I know for example that GCC is really bad at handling and optimizing
pass-by-value arguments, and I have already submitted a few bug-reports
on this topic.

Best regards,

Guillaume



More information about the Std-interval mailing list