Code Review: rubyopt

tfpt review “/shelveset:rubyopt;REDMOND\tomat”

Misc Ruby optimizations.

  • Optimizes method lookup:
    
  1. Adds cache for unsuccessful CLR member lookup. CLR types are
    read-only and so the knowledge of a member lookup failure could be
    stored for the next lookup. This saves about 10% of allocated memory
    since unsuccessful lookups in reflection allocate some MethodInfo
    arrays.
  2. Stores successfully resolved CLR members in the module method
    table. We don’t need to create a RubyMethodGroupInfo each time we find
    CLR member and also if we find it once it is available the next time as
    well (unless it is removed/modified).
  3. When a new method is added into a module/class and it doesn’t
    hide a method of the same name that was already used in dynamic sites,
    the sites don’t need to be invalidated.
  • Adds some perf counters.
    
  • Fixes message in method_missing.
    
  • Refactors RubyBinder a bit, especially super-call action.
    

Tomas

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs