Skip to content

Commit

Permalink
LocalVariable is immutable why do we make more in clone? Saves 1-2M o…
Browse files Browse the repository at this point in the history
…f memory running

empty Rails application console (-X-C vs JIT savings)
  • Loading branch information
enebo committed Dec 18, 2014
1 parent 0f4adc3 commit ffa0ce2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Object retrieve(ThreadContext context, IRubyObject self, StaticScope curr

@Override
public Variable clone(SimpleCloneInfo ii) {
return new LocalVariable(name, scopeDepth, offset);
return this;
}

public LocalVariable cloneForDepth(int n) {
Expand Down

0 comments on commit ffa0ce2

Please sign in to comment.