This is the mail archive of the
mailing list for the GCC project.
Re: flag_complex_method = 2 in C++?
Paolo Carlini wrote:I totally agree. I would ask Richard to help here...
Therefore, I'm not sure... I would certainly like to see method 2Performance tests would certainly be useful.
becoming the default everywhere, on the other hand, I'm not sure if
method 2 isn't too slow as default for C89 (outside fast-math, I
repeat). Shall we carry out performance tests perhaps, or peak
performance outside fast-math aren't really an issue here? I don't know.
I see your point. As you clearly see in your second sentence, I see
things slightly differently, I would not be much on the side of users
comparing the performance of C++0x to C89... But anyway this is just an
academic issue, for now...
In case of doubt, I would still switch to method 2 as default togetherThe problem is that this isn't how users think about it.
with C++0x, in that case the reference C language is C99 and things are
If a user does:
and gets different performance between the two, I think we're going to
have a "C++ is slow" bug report. In a certain sense, the user may be
right, in that C99/C++ mandate a slower approach than is used by GNU
C89. But, because GNU C89 is the default, we still have a problem.
... assuming we can enable method everywhere, that would be great.
Since C99 has defined semantics for this, and C++ is following, it seems
reasonable to me to change C89 to always use these semantics. Then,
some GNU C89 programs may go a bit slower, but we don't have weird
differences between the languages. And, users can use -ffast-math to
get the performance back -- in all languages, uniformly.
Ah, one final remark wrt C++0x: note that currently, irrespective of the
switches, there is *no way* for the user to choose method 2 in C++. I
think this is very bad in C++0x mode: essentially, as regards this
feature, it cannot track C99 as it *must*. I really hope we can enable
method 2 one way or another...