From: Paul A Bristow (boost_at_[hidden])
Date: 2003-06-18 15:49:47
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Daniel Frey
| Sent: 18 June 2003 11:15
| To: boost_at_[hidden]
| Subject: [boost] Re: Math Constants Formal Review
| >>Paul A Bristow wrote:
| >>>I am confident that your system also generates efficient
| code using
| >>>an efficient compiler. But have you considered or tried debugging?
| > What should be verified?
Previous work using this templating technique produced some code in
debug mode which was rather confusing to debug. Every time a constant
like pi was used, you had to step through procedure call code. This was
a minor but most irritating and distracting feature compared to code
from plain const double pi.
| How efficient different compilers work with the template-approach I
| showed. I'll try to do that for the GCC 2.95 / 3.x and for the Intel
| compiler (v7) at the weekend, but my experience with reading
| x86-assembler is limited, so maybe I'll just run some
| benchmarks. As I don't have/use Windows, I can't verify compilers for
Ed Brey has recently verified that with MSVC 7.1
the Kenniston code looks optimal,
and that no code is generated for unused constants.
(You can see the previous MSVC 6.SP5 assembly output
as comments at the end of testFunctionConstants.cpp
6.SP5 did create unwanted code in 'strict' mode).
I strongly recommend looking at the code as well
- you might find benchmarks by themselves misleading.
You should see a Fstp or fld qword ops - I think.
Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria LA8 8AB UK
+44 1539 561830
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk