lookup table creation (was: reflection)

Jecel Assumpcao Jr jecel at merlintec.com
Tue Nov 12 22:32:53 UTC 2002


On Tuesday 12 November 2002 19:02, James McCartney wrote:
> That is interesting, because they say that in the majority of cases
> that the table creation time was less than 1/100 of a second. For my
> own work, music, even a pause of several milliseconds is too long,
> but this alg. might be fast enough.

You need to create the table only when first reading in the system into 
an "empty world". You probably won't be playing music just then.

An option would be to throw away the table and build a new one every 
time the programmer makes any changes, and with this system even this 
would be fast enough. If you just patch the tables then the pause will 
be far shorter.

> I'm looking for constant time
> lookup and incremental update of inheritance. They say that they
> sacrifice constant time lookup with this scheme. I'll have to read
> the paper now..

They have a small binary search. In Self we have a linear search in the 
PICs (polymorphic inline caches) so we don't have constant lookup times 
either. In fact, no processor with caches will ever really have 
constant lookup times.

-- Jecel



More information about the Self-interest mailing list