public void Switch_Pattern_Matching() { var varialbes = new Dictionary <VariableSymbol, object>(); var evaluator = new SwitchPatternEvaluator(_expressions[4], varialbes); for (int i = 0; i < N; i++) { evaluator.Evaluate(); } }
public void Random_Switch_Pattern_Matching() { var varialbes = new Dictionary <VariableSymbol, object>(); var rnd = new Random(DateTime.Now.Second); for (int i = 0; i < N; i++) { varialbes.Clear(); varialbes.Add(_testVarialbe, 10); var index = rnd.Next(0, 4); var evaluator = new SwitchPatternEvaluator(_expressions[index], varialbes); evaluator.Evaluate(); } }