Chaim Frenkel <[EMAIL PROTECTED]> writes:
>
>I was hoping that the vtbls would be self-operating. Without much need
>to work hard on them.

They would be if you just did not expect so much of them - there is 
an intrinsic cost on way Perl method calls work - we can push it about 
but eventually have to pay.

I think we do this:
  1. Global name -> identifier mapping 
     An identifier is a "one word" value that is easy to hash and compare.
     Could be an integer or just the address of the "shared name".
  2. Store this (static, small) identifiers in the ops.
  3. Each package has a lookup-table _keyed_ by the identifiers.
     This is a "hash" in computer science terms not in perl terms.

I it may even be worth computing 
"perfect" hash tables for (3) - perhaps only when a package is shown 
to be "hot".

>
>Well, we could preload the vtbl with a _replace_me_ stub to do the
>cacheing.

Just leave vtable blank and fill it when we need it - that part of perl's
mechanism is not the problem.

-- 
Nick Ing-Simmons

Reply via email to