Patch: More __builtin_expect fun

Andrew Haley aph@pasanda.cygnus.co.uk
Mon May 1 03:17:00 GMT 2000


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


More information about the Java-patches mailing list