using System.Diagnostics;
private static void Benchmark(Action act, int iterations)
Stopwatch sw = Stopwatch.StartNew();
for (int i = 0; i < iterations; i++)
Console.WriteLine((sw.ElapsedTicks).ToString());
public static void Main(string[] args)
Benchmark(() => { temp = (current >= limit);}, 10000);
Benchmark(() => { if(current>=limit) temp = true; }, 10000);