Bug 25934 - fast instanceof checking
Summary: fast instanceof checking
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.1.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-23 23:31 UTC by Tom Tromey
Modified: 2006-12-07 18:37 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-01-24 00:46:17


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2006-01-23 23:31:40 UTC
instanceof (and checkcast, etc) are fairly slow in gcj currently.
Here are a couple of papers on the topic of speeding this up:

http://lambda-the-ultimate.org/node/view/1218
http://people.csail.mit.edu/jrb/pve/index.htm
Comment 1 Andrew Pinski 2006-01-24 00:46:17 UTC
Confirmed.
Comment 2 Tom Tromey 2006-03-15 20:26:34 UTC
Now I think we don't need to do anything here.
We already handle the common cases.

For instance, if the target is an interface we will use
the IDT to do this test.  This is reasonably fast.

Also if both classes in question are concrete, we will
use the 'ancestors' array to do a constant-time check.
Comment 3 Tom Tromey 2006-12-07 18:37:01 UTC
Nothing to do -- not sure why I didn't close it earlier.