NoVarDynamicScope could be more singletonized, to reduce scoping costs for 
no-var methods to zero
-------------------------------------------------------------------------------------------------

                 Key: JRUBY-2783
                 URL: http://jira.codehaus.org/browse/JRUBY-2783
             Project: JRuby
          Issue Type: Bug
          Components: Performance
            Reporter: Charles Oliver Nutter


Currently any method or closure bodies that have no variables will use a 
NoVarDynamicScope, which does not allocate any space for variables. However, it 
still allocates space for itself and for standard DynamicScope fields, when it 
will never be used. We should try to eliminate it.

The primary concerns to address when eliminating it are:

* DynamicScope is used for cref access, used for constant resolution, etc
* A NoVar scope in a block must still be constructed to hold a reference to the 
parent scope

So this is primarily an optimization applicable to root scopes like class 
bodies and methods.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email


Reply via email to