Index: branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs
===================================================================
--- branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 9271)
+++ branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 9290)
@@ -32,6 +32,4 @@
     // an optional object value (addresses for calls, argument index for arguments)
     public object iArg0;
-    // hold the value of the instruction
-    public double value;
   }
 }
Index: branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj
===================================================================
--- branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj	(revision 9271)
+++ branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj	(revision 9290)
@@ -126,8 +126,4 @@
       <HintPath>..\..\..\..\Trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     </Reference>
-    <Reference Include="HeuristicLab.Optimization.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\Trunk\sources\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath>
-    </Reference>
     <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
       <SpecificVersion>False</SpecificVersion>
@@ -141,8 +137,4 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\Trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\Trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     </Reference>
     <Reference Include="System" />
@@ -151,12 +143,4 @@
     </Reference>
     <Reference Include="System.Drawing" />
-    <Reference Include="System.Xml.Linq">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Data.DataSetExtensions">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
Index: branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs
===================================================================
--- branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 9271)
+++ branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 9290)
@@ -124,126 +124,129 @@
       }
 
+      double[] values = new double[code.Length];
+
       foreach (var rowEnum in rows) {
         int row = rowEnum;
-        yield return Evaluate(dataset, ref row, code);
+        yield return Evaluate(dataset, ref row, code, values);
       }
     }
 
-    protected virtual double Evaluate(Dataset dataset, ref int row, Instruction[] code) {
+    protected virtual double Evaluate(Dataset dataset, ref int row, Instruction[] code, double[] values) {
       int count = 0;
       for (int j = 0; j != code.Length; ++j) {
         Instruction currentInstr = code[j];
 
+        #region switch
         switch (currentInstr.opCode) {
           case OpCodes.Add: {
-              double s = code[j - currentInstr.nArguments].value;
-              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
-                s += code[i].value;
-              }
-              currentInstr.value = s;
+              double s = values[j - currentInstr.nArguments];
+              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
+                s += values[i];
+              }
+              values[j] = s;
             }
             break;
           case OpCodes.Sub: {
-              double s = code[j - currentInstr.nArguments].value;
-              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
-                s -= code[i].value;
+              double s = values[j - currentInstr.nArguments];
+              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
+                s -= values[i];
               }
               if (currentInstr.nArguments == 1) s = -s;
-              currentInstr.value = s;
+              values[j] = s;
             }
             break;
           case OpCodes.Mul: {
-              double p = code[j - currentInstr.nArguments].value;
-              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
-                p *= code[i].value;
-              }
-              currentInstr.value = p;
+              double p = values[j - currentInstr.nArguments];
+              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
+                p *= values[i];
+              }
+              values[j] = p;
             }
             break;
           case OpCodes.Div: {
-              double p = code[j - currentInstr.nArguments].value;
-              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
-                p /= code[i].value;
+              double p = values[j - currentInstr.nArguments];
+              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
+                p /= values[i];
               }
               if (currentInstr.nArguments == 1) p = 1.0 / p;
-              currentInstr.value = p;
+              values[j] = p;
             }
             break;
           case OpCodes.Average: {
-              double sum = code[j - currentInstr.nArguments].value;
-              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
-                sum += code[i].value;
-              }
-              currentInstr.value = sum / currentInstr.nArguments;
+              double sum = values[j - currentInstr.nArguments];
+              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
+                sum += values[i];
+              }
+              values[j] = sum / currentInstr.nArguments;
             }
             break;
           case OpCodes.Cos: {
-              currentInstr.value = Math.Cos(code[j - 1].value);
+              values[j] = Math.Cos(values[j - currentInstr.nArguments]);
             }
             break;
           case OpCodes.Sin: {
-              currentInstr.value = Math.Sin(code[j - 1].value);
+              values[j] = Math.Sin(values[j - currentInstr.nArguments]);
               break;
             }
           case OpCodes.Tan: {
-              currentInstr.value = Math.Tan(code[j - 1].value);
+              values[j] = Math.Tan(values[j - currentInstr.nArguments]);
             }
             break;
           case OpCodes.Square: {
-              currentInstr.value = Math.Pow(code[j - 1].value, 2);
+              values[j] = Math.Pow(values[j - currentInstr.nArguments], 2);
             }
             break;
           case OpCodes.Power: {
-              double x = code[j - 2].value;
-              double y = Math.Round(code[j - 1].value);
-              currentInstr.value = Math.Pow(x, y);
+              double x = values[j - currentInstr.nArguments];
+              double y = Math.Round(values[j - currentInstr.nArguments + 1]);
+              values[j] = Math.Pow(x, y);
             }
             break;
           case OpCodes.SquareRoot: {
-              currentInstr.value = Math.Sqrt(code[j - 1].value);
+              values[j] = Math.Sqrt(values[j - currentInstr.nArguments]);
             }
             break;
           case OpCodes.Root: {
-              double x = code[j - 2].value;
-              double y = Math.Round(code[j - 1].value);
-              currentInstr.value = Math.Pow(x, 1 / y);
+              double x = values[j - currentInstr.nArguments];
+              double y = Math.Round(values[j - currentInstr.nArguments + 1]);
+              values[j] = Math.Pow(x, 1 / y);
             }
             break;
           case OpCodes.Exp: {
-              currentInstr.value = Math.Exp(code[j - 1].value);
+              values[j] = Math.Exp(values[j - currentInstr.nArguments]);
             }
             break;
           case OpCodes.Log: {
-              currentInstr.value = Math.Log(code[j - 1].value);
+              values[j] = Math.Log(values[j - currentInstr.nArguments]);
             }
             break;
           case OpCodes.Gamma: {
-              currentInstr.value = double.IsNaN(code[j - 1].value) ? double.NaN : alglib.gammafunction(code[j - 1].value);
+              values[j] = double.IsNaN(values[j - currentInstr.nArguments]) ? double.NaN : alglib.gammafunction(values[j - currentInstr.nArguments]);
             }
             break;
           case OpCodes.Psi: {
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
-              else if (x <= 0 && (Math.Floor(x) - x).IsAlmost(0)) currentInstr.value = double.NaN;
-              else currentInstr.value = alglib.psi(x);
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
+              else if (x <= 0 && (Math.Floor(x) - x).IsAlmost(0)) values[j] = double.NaN;
+              else values[j] = alglib.psi(x);
             }
             break;
           case OpCodes.Dawson: {
-              var x = code[j - 1].value;
-              currentInstr.value = double.IsNaN(x) ? double.NaN : alglib.dawsonintegral(x);
+              var x = values[j - currentInstr.nArguments];
+              values[j] = double.IsNaN(x) ? double.NaN : alglib.dawsonintegral(x);
             }
             break;
           case OpCodes.ExponentialIntegralEi: {
-              var x = code[j - 1].value;
-              currentInstr.value = double.IsNaN(x) ? double.NaN : alglib.exponentialintegralei(x);
+              var x = values[j - currentInstr.nArguments];
+              values[j] = double.IsNaN(x) ? double.NaN : alglib.exponentialintegralei(x);
             }
             break;
           case OpCodes.SineIntegral: {
               double si, ci;
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
               else {
                 alglib.sinecosineintegrals(x, out si, out ci);
-                currentInstr.value = si;
+                values[j] = si;
               }
             }
@@ -251,9 +254,9 @@
           case OpCodes.CosineIntegral: {
               double si, ci;
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
               else {
                 alglib.sinecosineintegrals(x, out si, out ci);
-                currentInstr.value = ci;
+                values[j] = ci;
               }
             }
@@ -261,9 +264,9 @@
           case OpCodes.HyperbolicSineIntegral: {
               double shi, chi;
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
               else {
                 alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
-                currentInstr.value = shi;
+                values[j] = shi;
               }
             }
@@ -271,9 +274,9 @@
           case OpCodes.HyperbolicCosineIntegral: {
               double shi, chi;
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
               else {
                 alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
-                currentInstr.value = chi;
+                values[j] = chi;
               }
             }
@@ -281,9 +284,9 @@
           case OpCodes.FresnelCosineIntegral: {
               double c = 0, s = 0;
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
               else {
                 alglib.fresnelintegral(x, ref c, ref s);
-                currentInstr.value = c;
+                values[j] = c;
               }
             }
@@ -291,9 +294,9 @@
           case OpCodes.FresnelSineIntegral: {
               double c = 0, s = 0;
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
               else {
                 alglib.fresnelintegral(x, ref c, ref s);
-                currentInstr.value = s;
+                values[j] = s;
               }
             }
@@ -301,9 +304,9 @@
           case OpCodes.AiryA: {
               double ai, aip, bi, bip;
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
               else {
                 alglib.airy(x, out ai, out aip, out bi, out bip);
-                currentInstr.value = ai;
+                values[j] = ai;
               }
             }
@@ -311,63 +314,63 @@
           case OpCodes.AiryB: {
               double ai, aip, bi, bip;
-              var x = code[j - 1].value;
-              if (double.IsNaN(x)) currentInstr.value = double.NaN;
+              var x = values[j - currentInstr.nArguments];
+              if (double.IsNaN(x)) values[j] = double.NaN;
               else {
                 alglib.airy(x, out ai, out aip, out bi, out bip);
-                currentInstr.value = bi;
+                values[j] = bi;
               }
             }
             break;
           case OpCodes.Norm: {
-              var x = code[j - 1].value;
-              currentInstr.value = double.IsNaN(x) ? double.NaN : alglib.normaldistribution(x);
+              var x = values[j - currentInstr.nArguments];
+              values[j] = double.IsNaN(x) ? double.NaN : alglib.normaldistribution(x);
             }
             break;
           case OpCodes.Erf: {
-              var x = code[j - 1].value;
-              currentInstr.value = double.IsNaN(x) ? double.NaN : alglib.errorfunction(x);
+              var x = values[j - currentInstr.nArguments];
+              values[j] = double.IsNaN(x) ? double.NaN : alglib.errorfunction(x);
             }
             break;
           case OpCodes.Bessel: {
-              var x = code[j - 1].value;
-              currentInstr.value = double.IsNaN(x) ? double.NaN : alglib.besseli0(x);
+              var x = values[j - currentInstr.nArguments];
+              values[j] = double.IsNaN(x) ? double.NaN : alglib.besseli0(x);
             }
             break;
           case OpCodes.IfThenElse: {
-              double condition = code[j - currentInstr.nArguments].value;
-              double result = condition > 0.0 ? code[j - 2].value : code[j - 1].value;
-              currentInstr.value = result;
+              double condition = values[j - currentInstr.nArguments];
+              double result = condition > 0.0 ? values[j - currentInstr.nArguments] : values[j - currentInstr.nArguments + 1];
+              values[j] = result;
             }
             break;
           case OpCodes.AND: {
-              double result = code[j - currentInstr.nArguments].value;
-              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
-                if (result > 0.0) result = code[i].value;
-              }
-              currentInstr.value = result > 0.0 ? 1.0 : -1.0;
+              double result = values[j - currentInstr.nArguments];
+              for (int i = j - currentInstr.nArguments + 1; i < j; i++) {
+                if (result > 0.0) result = values[i];
+              }
+              values[j] = result > 0.0 ? 1.0 : -1.0;
             }
             break;
           case OpCodes.OR: {
-              double result = code[j - currentInstr.nArguments].value;
+              double result = values[j - currentInstr.nArguments];
               for (int i = 1; i < currentInstr.nArguments; i++) {
-                if (result <= 0.0) result = code[i].value; ;
-              }
-              currentInstr.value = result > 0.0 ? 1.0 : -1.0;
+                if (result <= 0.0) result = values[i]; ;
+              }
+              values[j] = result > 0.0 ? 1.0 : -1.0;
             }
             break;
           case OpCodes.NOT: {
-              currentInstr.value = code[j - 1].value > 0.0 ? -1.0 : 1.0;
+              values[j] = values[j - currentInstr.nArguments] > 0.0 ? -1.0 : 1.0;
             }
             break;
           case OpCodes.GT: {
-              double x = code[j - 2].value;
-              double y = code[j - 1].value;
-              currentInstr.value = x > y ? 1.0 : -1.0;
+              double x = values[j - currentInstr.nArguments];
+              double y = values[j - currentInstr.nArguments + 1];
+              values[j] = x > y ? 1.0 : -1.0;
             }
             break;
           case OpCodes.LT: {
-              double x = code[j - 2].value;
-              double y = code[j - 1].value;
-              currentInstr.value = x < y ? 1.0 : -1.0;
+              double x = values[j - currentInstr.nArguments];
+              double y = values[j - currentInstr.nArguments + 1];
+              values[j] = x < y ? 1.0 : -1.0;
             }
             break;
@@ -393,8 +396,8 @@
             }
           case OpCodes.Variable: {
-              if (row < 0 || row >= dataset.Rows) currentInstr.value = double.NaN;
+              if (row < 0 || row >= dataset.Rows) values[j] = double.NaN;
               else {
                 var variableTreeNode = (VariableTreeNode)currentInstr.dynamicNode;
-                currentInstr.value = ((IList<double>)currentInstr.iArg0)[row] * variableTreeNode.Weight;
+                values[j] = ((IList<double>)currentInstr.iArg0)[row] * variableTreeNode.Weight;
               }
             }
@@ -403,7 +406,7 @@
               var laggedVariableTreeNode = (LaggedVariableTreeNode)currentInstr.dynamicNode;
               int actualRow = row + laggedVariableTreeNode.Lag;
-              if (actualRow < 0 || actualRow >= dataset.Rows) currentInstr.value = double.NaN;
-              else {
-                currentInstr.value = ((IList<double>)currentInstr.iArg0)[actualRow] * laggedVariableTreeNode.Weight;
+              if (actualRow < 0 || actualRow >= dataset.Rows) values[j] = double.NaN;
+              else {
+                values[j] = ((IList<double>)currentInstr.iArg0)[actualRow] * laggedVariableTreeNode.Weight;
               }
             }
@@ -411,5 +414,5 @@
           case OpCodes.Constant: {
               var constTreeNode = (ConstantTreeNode)currentInstr.dynamicNode;
-              currentInstr.value = constTreeNode.Value;
+              values[j] = constTreeNode.Value;
             }
             break;
@@ -418,5 +421,5 @@
           //to determine the relative amounts of the true and false branch see http://en.wikipedia.org/wiki/Logistic_function
           case OpCodes.VariableCondition: {
-              if (row < 0 || row >= dataset.Rows) currentInstr.value = double.NaN;
+              if (row < 0 || row >= dataset.Rows) values[j] = double.NaN;
               else {
                 var variableConditionTreeNode = (VariableConditionTreeNode)currentInstr.dynamicNode;
@@ -425,8 +428,8 @@
                 double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
 
-                double trueBranch = code[j - currentInstr.nArguments].value;
-                double falseBranch = code[j - currentInstr.nArguments + 1].value;
-
-                currentInstr.value = trueBranch * p + falseBranch * (1 - p);
+                double trueBranch = values[j - currentInstr.nArguments];
+                double falseBranch = values[j - currentInstr.nArguments + 1];
+
+                values[j] = trueBranch * p + falseBranch * (1 - p);
               }
             }
@@ -435,4 +438,5 @@
             throw new NotSupportedException();
         }
+        #endregion
 
         // book-keeping in order to keep all the values correct
@@ -444,5 +448,5 @@
         if (count > narg) {
           for (int i = 1; i <= count - narg; ++i)
-            code[j - i].value = code[j - i - narg].value;
+            values[j - i] = values[j - i - narg];
         }
 
@@ -450,5 +454,5 @@
       }
 
-      return code[code.Length - 1].value;
+      return values[values.Length - 1];
     }
   }
