This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Fix istream::ignore + minor things
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Damour, James A" <James dot Damour at dfa dot state dot ny dot us>
- Cc: "Paolo Carlini" <pcarlini at suse dot de>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: 25 May 2004 14:28:57 +0200
- Subject: Re: [Patch] Fix istream::ignore + minor things
- Organization: Integrable Solutions
- References: <7FA1153FF6D88B40963AB014B22F5DCC2CC529@EXCNYSM0A1AB.nysemail.nyenet>
"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