This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch proposal: use __builtin_expect


Anthony> __builtin_expect is a new builtin function for providing
Anthony> hints to the compiler.

It would be way cool if you ran before-and-after performance
measurements on this.  I'm really curious to see what the effect is.

We should keep a page where we keep track of this sort of thing.
It would be interesting information historically, etc.

Anthony> I need to add a configure check to test for the existence of
Anthony> __builtin_expect.  There doesn't appear to be a header file
Anthony> for general private macros.  Where should I `#define
Anthony> __builtin_expect(A,B) (A)' if it isn't supported?

I assume some version (2.95?) of gcc doesn't have __builtin_expect.
Anyway, you can add this macro to jvm.h.  More header work is needed...

Anthony> Now that I think about it, we should modify the front end to
Anthony> take advantage of block reordering when we generate array
Anthony> bounds and class initialization tests.

We probably don't want to do this until the 2.95 mess is sorted out.
If 2.95 doesn't have support for this, then adding it will just make
the merger harder.  Yuck.

I've added caching to my JNI stubs patch.  Last night I was thinking
about adding __builtin_expect support there, too...

I like this patch.  I have no idea how you found all those places to
put __builtin_expect.  Cool.

Tom

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]