# Code Review: Instructions3

**URL:** <https://www.ruby-forum.com/t/code-review-instructions3/177744>\
**Category:** IronRuby\
**Created:** [October 22, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/code-review-instructions3/177744 "2009-10-22T22:15:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grujildo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Post date:** [October 22, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/code-review-instructions3/177744/1 "2009-10-22T22:15:55Z")

</div>

tfpt review “/shelveset:Instructions3;REDMOND\tomat”  
Comment :  
Refactors interpreter instructions.

Adds instruction static factories to Instruction class (similarly to  
Expression Tree factories). These factories take care of caching the  
instructions if possible. Some instructions are generic and their  
factories might need to call type.MakeGenericType(t). This is expensive  
so we cache generic factories and pre-generate them for primitive types.

Improves performance and working set of CallInstruction by merging it  
with ReflectedCaller class and generating specialized Run methods.

Removes name debug only field from LocalAccess instruction so that we  
can cache it. The instruction debug view looks up the name on  
LightCompiler.

The number of allocated instruction objects during “mspec ci core”  
test run drops from 3,042,810 down to 1,268,421.

Tomas
