[Patch] Fix istream::ignore + minor things

Gabriel Dos Reis gdr@integrable-solutions.net
Tue May 25 14:10:00 GMT 2004


"Damour, James A" <James.Damour@dfa.state.ny.us> writes:

| 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))

I've asked in the past for data, in supporting the __builtin_expect
cluttering in the codes (not that I'm firmly opposed, but I would need
to see data).  It was claimed that it would be faster with a different
compiler, but the actual experiment with GCC wa unconclusive.  So far.

-- Gaby



More information about the Libstdc++ mailing list