This is the mail archive of the
mailing list for the GCC project.
Re: std::pow implementation
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, jbuck at synopsys dot com
- Cc: aoliva at redhat dot com, bernds at redhat dot com, gcc at gcc dot gnu dot org,gdr at integrable-solutions dot net, rguenth at tat dot physik dot uni-tuebingen dot de,s dot bosscher at student dot tudelft dot nl
- Date: Mon, 4 Aug 2003 13:26:40 -0400 (EDT)
- Subject: Re: std::pow implementation
> Sigh. In C++, the programmer has already done the needed analysis, and
> has attached the keyword "inline" or defined the function in the class
> body. Certainly, with -O3 the kind of analysis you describe would be
> appropriate, though possibly expensive.
This claim is made repeatedly, but without any evidence. I think a lot of
C++ programmers decide whether to put thins in the class body on the basis
of other considerations than whether to inline -- a consideration that is
pretty hard to do for the great majority of C++ (or Ada for that matter)
programmers who have not the slightest awareness of machine language or
I do agree that if the programmer has attached the keyword "inline" then
that shows at least some thought, though whether it is well informed or
not can often be an issue.