Charles Oliver Nutter wrote:
- say "nyah" to all other implementations that claimed they'd be a lot faster because of selective variable boxing

It appears that boxing does help one aspect of local variables: assignment. In our case, assignment of a local variable do a heap-based scope stuffs it in an array, which requires Java to do boundschecking. But with selective boxing, we avoid the boundchecking cost completely.

Fully heap-based:
10M * 100 local var assignments and retrievals
  8.492000   0.000000   8.492000 (  8.492000)
  8.129000   0.000000   8.129000 (  8.129000)
  7.151000   0.000000   7.151000 (  7.152000)
  7.146000   0.000000   7.146000 (  7.146000)

Boxed:
10M * 100 local var assignments and retrievals
  1.598000   0.000000   1.598000 (  1.598000)
  1.783000   0.000000   1.783000 (  1.783000)
  1.500000   0.000000   1.500000 (  1.501000)
  1.530000   0.000000   1.530000 (  1.530000)

So not quite the "nyah" I wanted. This also points to a potential performance issue with our DynamicScope using an array; the cost of stuffing variables into an array is pretty high. Perhaps for low numbers of vars we could try custom DynamicScope impls that use fields? Work exploring.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to