From: Alexandre Oliva (oliva@dcc.unicamp.br)
Date: Sun Dec 20 1998 - 00:24:23 EST
On Dec 19, 1998, Godmar Back <gback@cs.utah.edu> wrote:
> What I did is to precompute and store the indices in the method dispatch
> table where a given interface method sits (if it's there).
> This is stored in the itable2dtable array.
> The complexity of the new implementation is
> O(number of interfaces implemented by that class) plus a constant.
This could be made still faster by making itable2dtable a hashtable,
instead of an array. Since the hash table will be computed at class
load time, we can ensure that it is a perfect hash table (on the
interface address). Then, instead of O(nI), it would become O(1), and
I don't expect the memory overhead to be large.
> This is why Alexandre's "performance.java" is somewhat bogus, since
> it perform invokeinterface on a class with only one or two methods.
In fact, it was designed to measure the impact of introducing
reflection abilities (Guaranį) in Kaffe, so the tests were created so
that Kaffe would do the minimal amount of computation, so that the
impact would be maximum.
-- Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org} oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org} Universidade Estadual de Campinas, SP, Brasil
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:25 EDT