Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchInstruction.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchInstruction.cs	(revision 17071)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchInstruction.cs	(revision 17071)
@@ -0,0 +1,12 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public struct BatchInstruction {
+    public byte opcode;
+    public ushort narg;
+    public int childIndex;
+
+    public double value; // for constants
+    public double weight; // for variables
+    public double[] buf;
+    public double[] data; // to hold dataset data
+  }
+}
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchOperations.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchOperations.cs	(revision 17071)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchOperations.cs	(revision 17071)
@@ -0,0 +1,92 @@
+﻿using System;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public static class BatchOperations {
+    public const int BATCHSIZE = 64;
+
+    public static void Load(double[] a, double[] b) {
+      Array.Copy(b, a, BATCHSIZE);
+    }
+
+    public static void Add(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i) {
+        a[i] += b[i];
+      }
+    }
+
+    public static void Sub(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i) {
+        a[i] -= b[i];
+      }
+    }
+
+    public static void Div(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i) {
+        a[i] /= b[i];
+      }
+    }
+
+    public static void Mul(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i) {
+        a[i] *= b[i];
+      }
+    }
+
+    public static void Neg(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i) {
+        a[i] = -b[i];
+      }
+    }
+
+    public static void Inv(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i) {
+        a[i] = 1 / b[i];
+      }
+    }
+
+    public static void Log(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Log(b[i]);
+    }
+
+    public static void Exp(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Exp(b[i]);
+    }
+
+    public static void Sin(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Sin(b[i]);
+    }
+
+    public static void Cos(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Cos(b[i]);
+    }
+
+    public static void Tan(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Tan(b[i]);
+    }
+
+    public static void Pow(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Pow(a[i], Math.Round(b[i]));
+    }
+
+    public static void Root(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Pow(a[i], 1 / Math.Round(b[i]));
+    }
+
+    public static void Square(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Pow(b[i], 2d);
+    }
+
+    public static void Sqrt(double[] a, double[] b) {
+      for (int i = 0; i < BATCHSIZE; ++i)
+        a[i] = Math.Sqrt(b[i]);
+    }
+  }
+}
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeBatchInterpreter.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeBatchInterpreter.cs	(revision 17071)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeBatchInterpreter.cs	(revision 17071)
@@ -0,0 +1,233 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+using static HeuristicLab.Problems.DataAnalysis.Symbolic.BatchOperations;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("SymbolicDataAnalysisExpressionTreeBatchInterpreter", "An interpreter that uses batching and vectorization techniques to achieve faster performance.")]
+  [StorableClass]
+  public class SymbolicDataAnalysisExpressionTreeBatchInterpreter : ParameterizedNamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter {
+    private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
+
+    #region parameters
+    public IFixedValueParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public int EvaluatedSolutions {
+      get { return EvaluatedSolutionsParameter.Value.Value; }
+      set { EvaluatedSolutionsParameter.Value.Value = value; }
+    }
+    #endregion
+
+    public void ClearState() { }
+
+    public SymbolicDataAnalysisExpressionTreeBatchInterpreter() {
+      Parameters.Add(new FixedValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
+    }
+
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionTreeBatchInterpreter(bool deserializing) : base(deserializing) { }
+    protected SymbolicDataAnalysisExpressionTreeBatchInterpreter(SymbolicDataAnalysisExpressionTreeBatchInterpreter original, Cloner cloner) : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionTreeBatchInterpreter(this, cloner);
+    }
+
+    private void LoadData(BatchInstruction instr, int[] rows, int rowIndex, int batchSize) {
+      for (int i = 0; i < batchSize; ++i) {
+        var row = rows[rowIndex] + i;
+        instr.buf[i] = instr.weight * instr.data[row];
+      }
+    }
+
+    private void Evaluate(BatchInstruction[] code, int[] rows, int rowIndex, int batchSize) {
+      for (int i = code.Length - 1; i >= 0; --i) {
+        var instr = code[i];
+        var c = instr.childIndex;
+        var n = instr.narg;
+
+        switch (instr.opcode) {
+          case OpCodes.Variable: {
+              LoadData(instr, rows, rowIndex, batchSize);
+              break;
+            }
+
+          case OpCodes.Add: {
+              Load(instr.buf, code[c].buf);
+              for (int j = 1; j < n; ++j) {
+                Add(instr.buf, code[c + j].buf);
+              }
+              break;
+            }
+
+          case OpCodes.Sub: {
+              if (n == 1) {
+                Neg(instr.buf, code[c].buf);
+              } else {
+                Load(instr.buf, code[c].buf);
+                for (int j = 1; j < n; ++j) {
+                  Sub(instr.buf, code[c + j].buf);
+                }
+              }
+              break;
+            }
+
+          case OpCodes.Mul: {
+              Load(instr.buf, code[c].buf);
+              for (int j = 1; j < n; ++j) {
+                Mul(instr.buf, code[c + j].buf);
+              }
+              break;
+            }
+
+          case OpCodes.Div: {
+              if (n == 1) {
+                Inv(instr.buf, code[c].buf);
+              } else {
+                Load(instr.buf, code[c].buf);
+                for (int j = 1; j < n; ++j) {
+                  Div(instr.buf, code[c + j].buf);
+                }
+              }
+              break;
+            }
+
+          case OpCodes.Square: {
+              Square(instr.buf, code[c].buf);
+              break;
+            }
+
+          case OpCodes.Root: {
+              Root(instr.buf, code[c].buf);
+              break;
+            }
+
+          case OpCodes.SquareRoot: {
+              Sqrt(instr.buf, code[c].buf);
+              break;
+            }
+
+          case OpCodes.Power: {
+              Pow(instr.buf, code[c].buf);
+              break;
+            }
+
+          case OpCodes.Exp: {
+              Exp(instr.buf, code[c].buf);
+              break;
+            }
+
+          case OpCodes.Log: {
+              Log(instr.buf, code[c].buf);
+              break;
+            }
+
+          case OpCodes.Sin: {
+              Sin(instr.buf, code[c].buf);
+              break;
+            }
+
+          case OpCodes.Cos: {
+              Cos(instr.buf, code[c].buf);
+              break;
+            }
+
+          case OpCodes.Tan: {
+              Tan(instr.buf, code[c].buf);
+              break;
+            }
+        }
+      }
+    }
+
+    [ThreadStatic]
+    private Dictionary<string, double[]> cachedData;
+
+    private void InitCache(IDataset dataset) {
+      cachedData = new Dictionary<string, double[]>();
+      foreach (var v in dataset.DoubleVariables) {
+        var values = dataset.GetDoubleValues(v).ToArray();
+      }
+    }
+
+    public void InitializeState() {
+      cachedData = null;
+      EvaluatedSolutions = 0;
+    }
+
+    private double[] GetValues(ISymbolicExpressionTree tree, IDataset dataset, int[] rows) {
+      var code = Compile(tree, dataset, OpCodes.MapSymbolToOpCode);
+      var remainingRows = rows.Length % BATCHSIZE;
+      var roundedTotal = rows.Length - remainingRows;
+
+      var result = new double[rows.Length];
+
+      for (int rowIndex = 0; rowIndex < roundedTotal; rowIndex += BATCHSIZE) {
+        Evaluate(code, rows, rowIndex, BATCHSIZE);
+        Array.Copy(code[0].buf, 0, result, rowIndex, BATCHSIZE);
+      }
+
+      if (remainingRows > 0) {
+        Evaluate(code, rows, roundedTotal, remainingRows);
+        Array.Copy(code[0].buf, 0, result, roundedTotal, remainingRows);
+      }
+
+      return result;
+    }
+
+    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, IDataset dataset, int[] rows) {
+      if (cachedData == null) {
+        InitCache(dataset);
+      }
+      return GetValues(tree, dataset, rows);
+    }
+
+    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, IDataset dataset, IEnumerable<int> rows) {
+      return GetSymbolicExpressionTreeValues(tree, dataset, rows.ToArray());
+    }
+
+    private BatchInstruction[] Compile(ISymbolicExpressionTree tree, IDataset dataset, Func<ISymbolicExpressionTreeNode, byte> opCodeMapper) {
+      var root = tree.Root.GetSubtree(0).GetSubtree(0);
+      var code = new BatchInstruction[root.GetLength()];
+      if (root.SubtreeCount > ushort.MaxValue) throw new ArgumentException("Number of subtrees is too big (>65.535)");
+      int c = 1, i = 0;
+      foreach (var node in root.IterateNodesBreadth()) {
+        if (node.SubtreeCount > ushort.MaxValue) throw new ArgumentException("Number of subtrees is too big (>65.535)");
+        code[i] = new BatchInstruction {
+          opcode = opCodeMapper(node),
+          narg = (ushort)node.SubtreeCount,
+          buf = new double[BATCHSIZE],
+          childIndex = c
+        };
+        if (node is VariableTreeNode variable) {
+          code[i].weight = variable.Weight;
+          if (cachedData.ContainsKey(variable.VariableName)) {
+            code[i].data = cachedData[variable.VariableName];
+          } else {
+            code[i].data = dataset.GetReadOnlyDoubleValues(variable.VariableName).ToArray();
+            cachedData[variable.VariableName] = code[i].data;
+          }
+        } else if (node is ConstantTreeNode constant) {
+          code[i].value = constant.Value;
+          for (int j = 0; j < BATCHSIZE; ++j)
+            code[i].buf[j] = code[i].value;
+        }
+        c += node.SubtreeCount;
+        ++i;
+      }
+      return code;
+    }
+  }
+}
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeNativeInterpreter.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeNativeInterpreter.cs	(revision 17071)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeNativeInterpreter.cs	(revision 17071)
@@ -0,0 +1,140 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("SymbolicDataAnalysisExpressionTreeNativeInterpreter", "An interpreter that wraps a native dll")]
+  public class SymbolicDataAnalysisExpressionTreeNativeInterpreter : ParameterizedNamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter {
+    private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions";
+
+    #region parameters
+    public IFixedValueParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public int EvaluatedSolutions {
+      get { return EvaluatedSolutionsParameter.Value.Value; }
+      set { EvaluatedSolutionsParameter.Value.Value = value; }
+    }
+    #endregion
+
+    public void ClearState() { }
+
+    public SymbolicDataAnalysisExpressionTreeNativeInterpreter() {
+      Parameters.Add(new FixedValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0)));
+    }
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisExpressionTreeNativeInterpreter(bool deserializing) : base(deserializing) { }
+
+
+    protected SymbolicDataAnalysisExpressionTreeNativeInterpreter(SymbolicDataAnalysisExpressionTreeNativeInterpreter original, Cloner cloner) : base(original, cloner) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionTreeNativeInterpreter(this, cloner);
+    }
+
+    private NativeInstruction[] Compile(ISymbolicExpressionTree tree, Func<ISymbolicExpressionTreeNode, byte> opCodeMapper) {
+      var root = tree.Root.GetSubtree(0).GetSubtree(0);
+      var code = new NativeInstruction[root.GetLength()];
+      if (root.SubtreeCount > ushort.MaxValue) throw new ArgumentException("Number of subtrees is too big (>65.535)");
+      code[0] = new NativeInstruction { narg = (ushort)root.SubtreeCount, opcode = opCodeMapper(root) };
+      int c = 1, i = 0;
+      foreach (var node in root.IterateNodesBreadth()) {
+        for (int j = 0; j < node.SubtreeCount; ++j) {
+          var s = node.GetSubtree(j);
+          if (s.SubtreeCount > ushort.MaxValue) throw new ArgumentException("Number of subtrees is too big (>65.535)");
+          code[c + j] = new NativeInstruction { narg = (ushort)s.SubtreeCount, opcode = opCodeMapper(s) };
+        }
+
+        if (node is VariableTreeNode variable) {
+          code[i].weight = variable.Weight;
+          code[i].data = cachedData[variable.VariableName].AddrOfPinnedObject();
+        } else if (node is ConstantTreeNode constant) {
+          code[i].value = constant.Value;
+        }
+
+        code[i].childIndex = c;
+        c += node.SubtreeCount;
+        ++i;
+      }
+      return code;
+    }
+
+    private readonly object syncRoot = new object();
+
+    [ThreadStatic]
+    private static Dictionary<string, GCHandle> cachedData;
+
+    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, IDataset dataset, IEnumerable<int> rows) {
+      if (!rows.Any()) return Enumerable.Empty<double>();
+
+      lock (syncRoot) {
+        EvaluatedSolutions++; // increment the evaluated solutions counter
+      }
+
+      if (cachedData == null) {
+        InitCache(dataset);
+      }
+
+      var code = Compile(tree, OpCodes.MapSymbolToOpCode);
+
+      var rowsArray = rows.ToArray();
+      var result = new double[rowsArray.Length];
+
+      NativeWrapper.GetValuesVectorized(code, code.Length, rowsArray, rowsArray.Length, result);
+      return result;
+    }
+
+    private void InitCache(IDataset dataset) {
+      cachedData = new Dictionary<string, GCHandle>();
+      foreach (var v in dataset.DoubleVariables) {
+        var values = dataset.GetDoubleValues(v).ToArray();
+        var gch = GCHandle.Alloc(values, GCHandleType.Pinned);
+        cachedData[v] = gch;
+      }
+    }
+
+    public void InitializeState() {
+      if (cachedData != null) {
+        foreach (var gch in cachedData.Values) {
+          gch.Free();
+        }
+        cachedData = null;
+      }
+      EvaluatedSolutions = 0;
+    }
+  }
+}
