This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: gcj uses reflection for every INVOKEINTERFACE?


Per Bothner <per@bothner.com> writes:
> > In other words, what if instead of using the method name, signature,
> > and interface-name to identify the method when building the
> > constant-time tables, we instead use the address of the _Jv_Method of
> > the interface's method?

> I.e. you'd still need to generate the _JV_Method entries, but it
> miht be possible to drop the method names and signatures?

Precisely.  The latter are what really matters spacewise.


>  > JvInvokeInterface then checks something->class, which has a jmethod[]
>  > associated with it.  It scans through that array to find an 'i' such

> I.e. it's now no longer constant time.

Well, IIRC you could use this technique to construct a constant time
table (using the same algorithm, just substituting pointer equality
for string-comparison) when the class is loaded.

  - a


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