This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: Patch: More __builtin_expect fun
- To: bryce at albatross dot co dot nz
- Subject: Re: Patch: More __builtin_expect fun
- From: Andrew Haley <aph at pasanda dot cygnus dot co dot uk>
- Date: 1 May 2000 10:17:22 -0000
- CC: java-patches at sourceware dot cygnus dot com
> Date: Mon, 01 May 2000 22:11:14 +1200
> From: Bryce McKinlay <bryce@albatross.co.nz>
>
> I identified a few places where __builtin_expect should be worthwhile in
> the Class implementation.
>
> FYI, I have enabled __builtin_expect in my local tree with these
> changes, and it does seem to make a measurable performance improvement
Great. One small nit: as this is C++ code, shouldn't this
if (__builtin_expect (! obj || isPrimitive (), 0))
return false;
read better as:
if (__builtin_expect (! obj || isPrimitive (), false))
return false;
?
Andrew.