[Patch] Fix istream::ignore + minor things
Paolo Carlini
pcarlini@suse.de
Tue May 25 14:44:00 GMT 2004
Damour, James A wrote:
>Would your ignore code benefit from using __builtin_expect (see example
>below)?
>
>- if (__n != numeric_limits<streamsize>::max())
>+ if (__builtin_expect(__n !=
>numeric_limits<streamsize>::max(),1))
>
>
Thanks for the suggestion. The evidence about the benefits of
__builtin_expect is actually rather thin, however. You may find various
discussions about this topics on the lists.
The code is in flux, anyway, I have yet to provide the performance
improvement that I promised, which now (after having fixed the
conformance issue) is becoming quite clear. Expect something by the end
of the week.
By the way, are you willing to benchmark on a machine of your choice the
impact of __builtin_expect??
Thanks,
Paolo.
More information about the Libstdc++
mailing list