Skip to content

Instantly share code, notes, and snippets.

@bbarry
Last active June 28, 2019 04:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbarry/119968e12960ce7cd755bb473b4210a6 to your computer and use it in GitHub Desktop.
Save bbarry/119968e12960ce7cd755bb473b4210a6 to your computer and use it in GitHub Desktop.

You should really use benchmarkdotnet for benchmarking instead of StopWatch. http://benchmarkdotnet.org/

My computer locked and was unlocked during this run but it still looks basically exactly how I would expect (taken from a different run than the full output):

Method Median StdDev
ArrayForWithoutOptimization 43.7021 ms 0.4290 ms
ArrayForWithOptimization 44.0643 ms 0.9018 ms
ArrayForeach 43.7403 ms 2.3760 ms
ArrayForEach 194.9748 ms 0.6127 ms
IListForWithoutOptimization 537.1226 ms 0.8278 ms
IListForWithOptimization 322.9111 ms 1.1799 ms
IListForeach 564.4380 ms 1.4602 ms
ListForWithoutOptimization 85.8628 ms 0.9617 ms
ListForWithOptimization 86.1902 ms 0.6764 ms
ListForeach 223.9313 ms 0.5171 ms
ListForEach 269.3693 ms 0.8048 ms

The loop variable length instance optimization is entirely negligable if the variable is an array (int[]) or a List<T>. Enumerating arrays (all 3 ways are the same within an error boundary) are about 2x as fast as for loop versions of a List<T> and about 5x faster than the lambda Array.ForEach call (Which shouldn't be used with a lambda like this... see the Eric Lippert post) or the foreach version of the List<T> loop. All of these are significantly faster than forcing the array version as an interface and writing a generic implementation.

Actually the optimization does have an impact in one place. It eliminates almost half the virtual method calls in the interface version, making that version almost twice as fast (3/5ths, close enough) as the one that makes twice as many virtual method calls (the .Count property).

In all we can come up with some general rules:

  • Don't use Array.ForEach like this (it does have applications, but a tight loop around a closure is a bad one).
  • If you are on a hot path and you have an array, it is worthwhile to cast to the array type. At that point it doesn't matter if you choose for or foreach, use whichever one makes the code nicer
  • If you are on a hot path and have a List<T> cast to the List<T> type and use a for loop.
  • If you have an IList<T> implementation and happen to be in a hot path, you are doing it wrong. If you still must continue, consider special casing an array hot path and a List<T> hot path (and maybe others). In the general case, use the for loop and optimize the virtual call as shown here.
  • Don't use list.ForEach like this (I am significantly less convinced that there are applications for this particular method; instead I strongly lean towards this being an anti-pattern).

so about ArrayForWithoutOptimization vs ArrayForeach (see IL) ...

For some reason the compiler (using VS2015 update 3 professional) decides to store the array in location 1 in the foreach version, but uses location 0 in the for version, so the first 4 IL instructions are out of order, both versions run:

ldsfld int32[] ConsoleApp2.Benchmarking::gArray
stloc."array"
ldc.i4.0
stloc."sum"

vs

ldsfld int32[] ConsoleApp2.Benchmarking::gArray
ldc.i4.0
stloc."sum"
stloc."array"

This ordering makes for no appreciable difference (JIT assembly is about the same). Then the loop variable is initialized:

ldc.i4.0 
stloc."i"

and an unconditional jump is done to the loop condition:

br.s condition

and the loop begins; here is the only meaningful difference is that the foreach version stores the array access in a local item variable:

loop:
  ldloc."sum"
  ldloc."array"
  ldloc."i"
  ldelem.i4 // evaluate "array[i]" by popping stack twice and pushing the result back on
  
vs

loop:
  ldloc."array"
  ldloc."i"
  ldelem.i4
  stloc."item"

which means the foreach version needs to load it into the stack again (note that the for version already has sum on the stack):

  add
  stloc."sum"
  
vs

  ldloc."sum"
  ldloc."item"
  add
  stloc."sum"

then both increment the loop variable by one:

  ldloc."i"
  ldc.i4.1
  add     
  stloc."i"

and then evaluate the loop condition:

condition:
  ldloc."i"
  ldloc."array"
  ldlen         //this is what makes the "optimization" pointless for arrays; 
                //using this IL instruction in the loop allows for an optimization by
                //the runtime where the array boundary is not checked in the "ldelem"
                //instruction in the same loop 
  conv.i4
  blt.s loop    //jump to loop start if (i < array.length)

and then finally the sum is returned:

 ldloc."sum"
 ret

in effect, the foreach version should be exactly the same as:

public static int ArrayForeach() {
    int[] array = gArray;
    int sum = 0;
    for (int i = 0; i < array.Length; i++) {
        int item = array[i];
        sum += item;
    }
    return sum;
}
// ***** BenchmarkRunner: Start *****
// Found benchmarks:
// Benchmarking_ArrayForWithoutOptimization
// Benchmarking_ArrayForWithOptimization
// Benchmarking_ArrayForeach
// Benchmarking_ArrayForEach
// Benchmarking_IListForWithoutOptimization
// Benchmarking_IListForWithOptimization
// Benchmarking_IListForeach
// Benchmarking_ListForWithoutOptimization
// Benchmarking_ListForWithOptimization
// Benchmarking_ListForeach
// Benchmarking_ListForEach
// Validating benchmarks:
// **************************
// Benchmark: Benchmarking_ArrayForWithoutOptimization
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 171513994.88 ns, 42.8785 ms/op
Pilot 2: 8 op, 354929398.38 ns, 44.3662 ms/op
IdleWarmup 1: 8 op, 1995.68 ns, 249.4606 ns/op
IdleWarmup 2: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 3: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 4: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 5: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 7: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 8: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 1: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 2: 8 op, 2280.78 ns, 285.0978 ns/op
IdleTarget 3: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 4: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 5: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 6: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 7: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 8: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 9: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 10: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 11: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 12: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 13: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 14: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 15: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 16: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 17: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 18: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 19: 8 op, 855.29 ns, 106.9117 ns/op
MainWarmup 1: 8 op, 346077966.27 ns, 43.2597 ms/op
MainWarmup 2: 8 op, 346260713.98 ns, 43.2826 ms/op
MainWarmup 3: 8 op, 357116383.77 ns, 44.6395 ms/op
MainWarmup 4: 8 op, 345833922.54 ns, 43.2292 ms/op
MainWarmup 5: 8 op, 351895102.25 ns, 43.9869 ms/op
MainWarmup 6: 8 op, 346043184.34 ns, 43.2554 ms/op
MainTarget 1: 8 op, 352500364.93 ns, 44.0625 ms/op
MainTarget 2: 8 op, 347543369.08 ns, 43.4429 ms/op
MainTarget 3: 8 op, 352509202.96 ns, 44.0637 ms/op
MainTarget 4: 8 op, 344575785.84 ns, 43.0720 ms/op
MainTarget 5: 8 op, 361199269.69 ns, 45.1499 ms/op
MainTarget 6: 8 op, 353674397.76 ns, 44.2093 ms/op
MainTarget 7: 8 op, 353313463.92 ns, 44.1642 ms/op
MainTarget 8: 8 op, 353789292.18 ns, 44.2237 ms/op
MainTarget 9: 8 op, 360430075.77 ns, 45.0538 ms/op
MainTarget 10: 8 op, 359590177.58 ns, 44.9488 ms/op
Result 1: 8 op, 352499794.73 ns, 44.0625 ms/op
Result 2: 8 op, 347542798.89 ns, 43.4428 ms/op
Result 3: 8 op, 352508632.76 ns, 44.0636 ms/op
Result 4: 8 op, 344575215.65 ns, 43.0719 ms/op
Result 5: 8 op, 361198699.5 ns, 45.1498 ms/op
Result 6: 8 op, 353673827.56 ns, 44.2092 ms/op
Result 7: 8 op, 353312893.72 ns, 44.1641 ms/op
Result 8: 8 op, 353788721.99 ns, 44.2236 ms/op
Result 9: 8 op, 360429505.57 ns, 45.0537 ms/op
Result 10: 8 op, 359589607.39 ns, 44.9487 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 178087780.48 ns, 44.5219 ms/op
Pilot 2: 8 op, 350639246.34 ns, 43.8299 ms/op
IdleWarmup 1: 8 op, 2280.78 ns, 285.0978 ns/op
IdleWarmup 2: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 3: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 4: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 5: 8 op, 1140.39 ns, 142.5489 ns/op
IdleWarmup 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 7: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 8: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 1: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 2: 8 op, 2565.88 ns, 320.7351 ns/op
IdleTarget 3: 8 op, 1425.49 ns, 178.1861 ns/op
IdleTarget 4: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 5: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 7: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 8: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 9: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 10: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 11: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 12: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 13: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 14: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 15: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 16: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 17: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 18: 8 op, 855.29 ns, 106.9117 ns/op
MainWarmup 1: 8 op, 354376023.5 ns, 44.2970 ms/op
MainWarmup 2: 8 op, 346102484.68 ns, 43.2628 ms/op
MainWarmup 3: 8 op, 351504233.13 ns, 43.9380 ms/op
MainWarmup 4: 8 op, 357887003.19 ns, 44.7359 ms/op
MainWarmup 5: 8 op, 362891040.17 ns, 45.3614 ms/op
MainWarmup 6: 8 op, 351850056.79 ns, 43.9813 ms/op
MainWarmup 7: 8 op, 352064450.35 ns, 44.0081 ms/op
MainWarmup 8: 8 op, 350593630.69 ns, 43.8242 ms/op
MainTarget 1: 8 op, 349855512.42 ns, 43.7319 ms/op
MainTarget 2: 8 op, 357766691.91 ns, 44.7208 ms/op
MainTarget 3: 8 op, 360666421.86 ns, 45.0833 ms/op
MainTarget 4: 8 op, 371081045.33 ns, 46.3851 ms/op
MainTarget 5: 8 op, 355495887.75 ns, 44.4370 ms/op
MainTarget 6: 8 op, 351900804.2 ns, 43.9876 ms/op
MainTarget 7: 8 op, 353066569.2 ns, 44.1333 ms/op
MainTarget 8: 8 op, 353166353.44 ns, 44.1458 ms/op
MainTarget 9: 8 op, 351394185.37 ns, 43.9243 ms/op
MainTarget 10: 8 op, 389632360.66 ns, 48.7040 ms/op
Result 1: 8 op, 349854657.13 ns, 43.7318 ms/op
Result 2: 8 op, 357765836.61 ns, 44.7207 ms/op
Result 3: 8 op, 360665566.57 ns, 45.0832 ms/op
Result 4: 8 op, 371080190.03 ns, 46.3850 ms/op
Result 5: 8 op, 355495032.46 ns, 44.4369 ms/op
Result 6: 8 op, 351899948.91 ns, 43.9875 ms/op
Result 7: 8 op, 353065713.91 ns, 44.1332 ms/op
Result 8: 8 op, 353165498.15 ns, 44.1457 ms/op
Result 9: 8 op, 351393330.08 ns, 43.9242 ms/op
Result 10: 8 op, 389631505.36 ns, 48.7039 ms/op
Mean = 44.5821 ms, StdError = 0.2699 ms (0.61%); N = 20, StdDev = 1.2068 ms
Min = 43.0719 ms, Q1 = 44.0250 ms, Median = 44.1867 ms, Q3 = 45.0012 ms, Max = 48.7039 ms
IQR = 0.9762 ms, LowerFence = 42.5607 ms, UpperFence = 46.4655 ms
ConfidenceInterval = [44.0532 ms; 45.1110 ms] (CI 95%)
Skewness = 1.98262725906963, Kurtosis = 7.24746174322024
// **************************
// Benchmark: Benchmarking_ArrayForWithOptimization
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 175534444.38 ns, 43.8836 ms/op
Pilot 2: 8 op, 344129037.56 ns, 43.0161 ms/op
IdleWarmup 1: 8 op, 2565.88 ns, 320.7351 ns/op
IdleWarmup 2: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 3: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 4: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 5: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 7: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 1: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 2: 8 op, 3136.08 ns, 392.0095 ns/op
IdleTarget 3: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 4: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 5: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 7: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 8: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 9: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 10: 8 op, 855.29 ns, 106.9117 ns/op
MainWarmup 1: 8 op, 340928814.49 ns, 42.6161 ms/op
MainWarmup 2: 8 op, 356384537.66 ns, 44.5481 ms/op
MainWarmup 3: 8 op, 355298314.96 ns, 44.4123 ms/op
MainWarmup 4: 8 op, 344894240.11 ns, 43.1118 ms/op
MainWarmup 5: 8 op, 350843946.57 ns, 43.8555 ms/op
MainWarmup 6: 8 op, 352274852.55 ns, 44.0344 ms/op
MainWarmup 7: 8 op, 352592736.62 ns, 44.0741 ms/op
MainWarmup 8: 8 op, 353804972.56 ns, 44.2256 ms/op
MainWarmup 9: 8 op, 364491009.16 ns, 45.5614 ms/op
MainWarmup 10: 8 op, 346920715.44 ns, 43.3651 ms/op
MainTarget 1: 8 op, 343304249.55 ns, 42.9130 ms/op
MainTarget 2: 8 op, 347555913.39 ns, 43.4445 ms/op
MainTarget 3: 8 op, 340159335.47 ns, 42.5199 ms/op
MainTarget 4: 8 op, 355289191.83 ns, 44.4111 ms/op
MainTarget 5: 8 op, 348186549.77 ns, 43.5233 ms/op
MainTarget 6: 8 op, 352613833.86 ns, 44.0767 ms/op
MainTarget 7: 8 op, 378826297.88 ns, 47.3533 ms/op
MainTarget 8: 8 op, 338992144.98 ns, 42.3740 ms/op
MainTarget 9: 8 op, 352210990.64 ns, 44.0264 ms/op
MainTarget 10: 8 op, 352714758.49 ns, 44.0893 ms/op
Result 1: 8 op, 343303394.26 ns, 42.9129 ms/op
Result 2: 8 op, 347555058.09 ns, 43.4444 ms/op
Result 3: 8 op, 340158480.18 ns, 42.5198 ms/op
Result 4: 8 op, 355288336.53 ns, 44.4110 ms/op
Result 5: 8 op, 348185694.48 ns, 43.5232 ms/op
Result 6: 8 op, 352612978.57 ns, 44.0766 ms/op
Result 7: 8 op, 378825442.59 ns, 47.3532 ms/op
Result 8: 8 op, 338991289.69 ns, 42.3739 ms/op
Result 9: 8 op, 352210135.34 ns, 44.0263 ms/op
Result 10: 8 op, 352713903.19 ns, 44.0892 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 181743019.66 ns, 45.4358 ms/op
Pilot 2: 8 op, 343896397.73 ns, 42.9870 ms/op
IdleWarmup 1: 8 op, 1995.68 ns, 249.4606 ns/op
IdleWarmup 2: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 3: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 4: 8 op, 1140.39 ns, 142.5489 ns/op
IdleWarmup 5: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 1: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 2: 8 op, 2850.98 ns, 356.3723 ns/op
IdleTarget 3: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 4: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 5: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 6: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 7: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 8: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 9: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 10: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 11: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 12: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 13: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 14: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 15: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 16: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 17: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 18: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 19: 8 op, 570.2 ns, 71.2745 ns/op
MainWarmup 1: 8 op, 342754295.85 ns, 42.8443 ms/op
MainWarmup 2: 8 op, 344017849.4 ns, 43.0022 ms/op
MainWarmup 3: 8 op, 347177873.67 ns, 43.3972 ms/op
MainWarmup 4: 8 op, 342501984.28 ns, 42.8127 ms/op
MainWarmup 5: 8 op, 350398908.87 ns, 43.7999 ms/op
MainWarmup 6: 8 op, 366274581.13 ns, 45.7843 ms/op
MainWarmup 7: 8 op, 355700587.99 ns, 44.4626 ms/op
MainTarget 1: 8 op, 346370191.54 ns, 43.2963 ms/op
MainTarget 2: 8 op, 352835925.06 ns, 44.1045 ms/op
MainTarget 3: 8 op, 347520846.35 ns, 43.4401 ms/op
MainTarget 4: 8 op, 351145580.07 ns, 43.8932 ms/op
MainTarget 5: 8 op, 351850341.89 ns, 43.9813 ms/op
MainTarget 6: 8 op, 351689261.62 ns, 43.9612 ms/op
MainTarget 7: 8 op, 356770560.11 ns, 44.5963 ms/op
MainTarget 8: 8 op, 349982666.05 ns, 43.7478 ms/op
MainTarget 9: 8 op, 359902074.6 ns, 44.9878 ms/op
MainTarget 10: 8 op, 350718788.63 ns, 43.8398 ms/op
Result 1: 8 op, 346369621.34 ns, 43.2962 ms/op
Result 2: 8 op, 352835354.87 ns, 44.1044 ms/op
Result 3: 8 op, 347520276.16 ns, 43.4400 ms/op
Result 4: 8 op, 351145009.88 ns, 43.8931 ms/op
Result 5: 8 op, 351849771.69 ns, 43.9812 ms/op
Result 6: 8 op, 351688691.42 ns, 43.9611 ms/op
Result 7: 8 op, 356769989.92 ns, 44.5962 ms/op
Result 8: 8 op, 349982095.86 ns, 43.7478 ms/op
Result 9: 8 op, 359901504.4 ns, 44.9877 ms/op
Result 10: 8 op, 350718218.44 ns, 43.8398 ms/op
Mean = 43.9289 ms, StdError = 0.2302 ms (0.52%); N = 20, StdDev = 1.0294 ms
Min = 42.3739 ms, Q1 = 43.4422 ms, Median = 43.9271 ms, Q3 = 44.0968 ms, Max = 47.3532 ms
IQR = 0.6546 ms, LowerFence = 42.4603 ms, UpperFence = 45.0788 ms
ConfidenceInterval = [43.4778 ms; 44.3801 ms] (CI 95%)
Skewness = 1.54015714423007, Kurtosis = 6.686931379051
// **************************
// Benchmark: Benchmarking_ArrayForeach
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 178701310.99 ns, 44.6753 ms/op
Pilot 2: 8 op, 343694548.47 ns, 42.9618 ms/op
IdleWarmup 1: 8 op, 2850.98 ns, 356.3723 ns/op
IdleWarmup 2: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 3: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 4: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 5: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 7: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 8: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 9: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 1: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 2: 8 op, 3136.08 ns, 392.0095 ns/op
IdleTarget 3: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 4: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 5: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 7: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 8: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 9: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 10: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 11: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 12: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 13: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 14: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 15: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 16: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 17: 8 op, 855.29 ns, 106.9117 ns/op
MainWarmup 1: 8 op, 335624569.5 ns, 41.9531 ms/op
MainWarmup 2: 8 op, 347086072.17 ns, 43.3858 ms/op
MainWarmup 3: 8 op, 346096212.53 ns, 43.2620 ms/op
MainWarmup 4: 8 op, 346203409.31 ns, 43.2754 ms/op
MainWarmup 5: 8 op, 373333603.23 ns, 46.6667 ms/op
MainWarmup 6: 8 op, 349921655.12 ns, 43.7402 ms/op
MainTarget 1: 8 op, 375202419.45 ns, 46.9003 ms/op
MainTarget 2: 8 op, 341612193.98 ns, 42.7015 ms/op
MainTarget 3: 8 op, 349135070.23 ns, 43.6419 ms/op
MainTarget 4: 8 op, 349493723.29 ns, 43.6867 ms/op
MainTarget 5: 8 op, 348785255.2 ns, 43.5982 ms/op
MainTarget 6: 8 op, 349110266.71 ns, 43.6388 ms/op
MainTarget 7: 8 op, 351835801.9 ns, 43.9795 ms/op
MainTarget 8: 8 op, 350433975.91 ns, 43.8042 ms/op
MainTarget 9: 8 op, 350823419.53 ns, 43.8529 ms/op
MainTarget 10: 8 op, 357313101.27 ns, 44.6641 ms/op
Result 1: 8 op, 375201564.16 ns, 46.9002 ms/op
Result 2: 8 op, 341611338.68 ns, 42.7014 ms/op
Result 3: 8 op, 349134214.93 ns, 43.6418 ms/op
Result 4: 8 op, 349492867.99 ns, 43.6866 ms/op
Result 5: 8 op, 348784399.9 ns, 43.5980 ms/op
Result 6: 8 op, 349109411.42 ns, 43.6387 ms/op
Result 7: 8 op, 351834946.61 ns, 43.9794 ms/op
Result 8: 8 op, 350433120.61 ns, 43.8041 ms/op
Result 9: 8 op, 350822564.24 ns, 43.8528 ms/op
Result 10: 8 op, 357312245.98 ns, 44.6640 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 172103292.08 ns, 43.0258 ms/op
Pilot 2: 8 op, 341084192.81 ns, 42.6355 ms/op
IdleWarmup 1: 8 op, 2280.78 ns, 285.0978 ns/op
IdleWarmup 2: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 3: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 4: 8 op, 855.29 ns, 106.9117 ns/op
IdleWarmup 5: 8 op, 570.2 ns, 71.2745 ns/op
IdleWarmup 6: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 1: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 2: 8 op, 2565.88 ns, 320.7351 ns/op
IdleTarget 3: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 4: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 5: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 6: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 7: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 8: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 9: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 10: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 11: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 12: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 13: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 14: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 15: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 16: 8 op, 855.29 ns, 106.9117 ns/op
IdleTarget 17: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 18: 8 op, 570.2 ns, 71.2745 ns/op
IdleTarget 19: 8 op, 570.2 ns, 71.2745 ns/op
MainWarmup 1: 8 op, 349383105.33 ns, 43.6729 ms/op
MainWarmup 2: 8 op, 349428435.88 ns, 43.6786 ms/op
MainWarmup 3: 8 op, 347078089.43 ns, 43.3848 ms/op
MainWarmup 4: 8 op, 338536558.66 ns, 42.3171 ms/op
MainWarmup 5: 8 op, 350209318.82 ns, 43.7762 ms/op
MainWarmup 6: 8 op, 353809249.03 ns, 44.2262 ms/op
MainWarmup 7: 8 op, 355853685.52 ns, 44.4817 ms/op
MainWarmup 8: 8 op, 355816337.7 ns, 44.4770 ms/op
MainTarget 1: 8 op, 354050156.69 ns, 44.2563 ms/op
MainTarget 2: 8 op, 357850225.57 ns, 44.7313 ms/op
MainTarget 3: 8 op, 359108362.26 ns, 44.8885 ms/op
MainTarget 4: 8 op, 343512941.16 ns, 42.9391 ms/op
MainTarget 5: 8 op, 339363342.35 ns, 42.4204 ms/op
MainTarget 6: 8 op, 352568503.3 ns, 44.0711 ms/op
MainTarget 7: 8 op, 349195225.87 ns, 43.6494 ms/op
MainTarget 8: 8 op, 358886271.06 ns, 44.8608 ms/op
MainTarget 9: 8 op, 360121314.83 ns, 45.0152 ms/op
MainTarget 10: 8 op, 359892666.37 ns, 44.9866 ms/op
Result 1: 8 op, 354049586.49 ns, 44.2562 ms/op
Result 2: 8 op, 357849655.37 ns, 44.7312 ms/op
Result 3: 8 op, 359107792.07 ns, 44.8885 ms/op
Result 4: 8 op, 343512370.96 ns, 42.9390 ms/op
Result 5: 8 op, 339362772.15 ns, 42.4203 ms/op
Result 6: 8 op, 352567933.11 ns, 44.0710 ms/op
Result 7: 8 op, 349194655.67 ns, 43.6493 ms/op
Result 8: 8 op, 358885700.86 ns, 44.8607 ms/op
Result 9: 8 op, 360120744.63 ns, 45.0151 ms/op
Result 10: 8 op, 359892096.18 ns, 44.9865 ms/op
Mean = 44.1142 ms, StdError = 0.2221 ms (0.5%); N = 20, StdDev = 0.9931 ms
Min = 42.4203 ms, Q1 = 43.6402 ms, Median = 43.9161 ms, Q3 = 44.7960 ms, Max = 46.9002 ms
IQR = 1.1557 ms, LowerFence = 41.9066 ms, UpperFence = 46.5296 ms
ConfidenceInterval = [43.6790 ms; 44.5495 ms] (CI 95%)
Skewness = 0.736016512781707, Kurtosis = 3.94626009271328
// **************************
// Benchmark: Benchmarking_ArrayForEach
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 780504041.55 ns, 195.1260 ms/op
IdleWarmup 1: 4 op, 3706.27 ns, 926.5679 ns/op
IdleWarmup 2: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2565.88 ns, 641.4701 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 2280.78 ns, 570.1956 ns/op
IdleTarget 11: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 15: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 16: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 17: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 775824445.88 ns, 193.9561 ms/op
MainWarmup 2: 4 op, 780560490.92 ns, 195.1401 ms/op
MainWarmup 3: 4 op, 777619706.87 ns, 194.4049 ms/op
MainWarmup 4: 4 op, 781991967.08 ns, 195.4980 ms/op
MainWarmup 5: 4 op, 781182289.27 ns, 195.2956 ms/op
MainWarmup 6: 4 op, 782409350.3 ns, 195.6023 ms/op
MainTarget 1: 4 op, 778329885.55 ns, 194.5825 ms/op
MainTarget 2: 4 op, 781723404.93 ns, 195.4309 ms/op
MainTarget 3: 4 op, 779518458.37 ns, 194.8796 ms/op
MainTarget 4: 4 op, 779298933.05 ns, 194.8247 ms/op
MainTarget 5: 4 op, 778537436.77 ns, 194.6344 ms/op
MainTarget 6: 4 op, 784151583.09 ns, 196.0379 ms/op
MainTarget 7: 4 op, 780118304.19 ns, 195.0296 ms/op
MainTarget 8: 4 op, 779932990.61 ns, 194.9832 ms/op
MainTarget 9: 4 op, 780405112.6 ns, 195.1013 ms/op
MainTarget 10: 4 op, 776087876.27 ns, 194.0220 ms/op
Result 1: 4 op, 778329030.26 ns, 194.5823 ms/op
Result 2: 4 op, 781722549.64 ns, 195.4306 ms/op
Result 3: 4 op, 779517603.08 ns, 194.8794 ms/op
Result 4: 4 op, 779298077.76 ns, 194.8245 ms/op
Result 5: 4 op, 778536581.47 ns, 194.6341 ms/op
Result 6: 4 op, 784150727.8 ns, 196.0377 ms/op
Result 7: 4 op, 780117448.9 ns, 195.0294 ms/op
Result 8: 4 op, 779932135.31 ns, 194.9830 ms/op
Result 9: 4 op, 780404257.31 ns, 195.1011 ms/op
Result 10: 4 op, 776087020.98 ns, 194.0218 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 780039047 ns, 195.0098 ms/op
IdleWarmup 1: 4 op, 2850.98 ns, 712.7446 ns/op
IdleWarmup 2: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 7: 4 op, 1140.39 ns, 285.0978 ns/op
IdleWarmup 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 1: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 2: 4 op, 2565.88 ns, 641.4701 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 9: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 10: 4 op, 2280.78 ns, 570.1956 ns/op
IdleTarget 11: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 13: 4 op, 285.1 ns, 71.2745 ns/op
IdleTarget 14: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 16: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 17: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 19: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 20: 4 op, 4846.66 ns, 1.2117 us/op
IdleTarget 21: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 22: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 23: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 24: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 25: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 26: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 27: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 28: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 29: 4 op, 570.2 ns, 142.5489 ns/op
MainWarmup 1: 4 op, 779152962.96 ns, 194.7882 ms/op
MainWarmup 2: 4 op, 776499557.53 ns, 194.1249 ms/op
MainWarmup 3: 4 op, 789454117.5 ns, 197.3635 ms/op
MainWarmup 4: 4 op, 778957670.96 ns, 194.7394 ms/op
MainWarmup 5: 4 op, 778507501.49 ns, 194.6269 ms/op
MainWarmup 6: 4 op, 781623620.7 ns, 195.4059 ms/op
MainWarmup 7: 4 op, 779746536.63 ns, 194.9366 ms/op
MainTarget 1: 4 op, 780845588.74 ns, 195.2114 ms/op
MainTarget 2: 4 op, 785636372.55 ns, 196.4091 ms/op
MainTarget 3: 4 op, 782223466.52 ns, 195.5559 ms/op
MainTarget 4: 4 op, 781239593.93 ns, 195.3099 ms/op
MainTarget 5: 4 op, 781552061.14 ns, 195.3880 ms/op
MainTarget 6: 4 op, 784720923.44 ns, 196.1802 ms/op
MainTarget 7: 4 op, 784615722.35 ns, 196.1539 ms/op
MainTarget 8: 4 op, 793929868.22 ns, 198.4825 ms/op
MainTarget 9: 4 op, 791772247.89 ns, 197.9431 ms/op
MainTarget 10: 4 op, 785067887.49 ns, 196.2670 ms/op
Result 1: 4 op, 780844733.44 ns, 195.2112 ms/op
Result 2: 4 op, 785635517.26 ns, 196.4089 ms/op
Result 3: 4 op, 782222611.22 ns, 195.5557 ms/op
Result 4: 4 op, 781238738.64 ns, 195.3097 ms/op
Result 5: 4 op, 781551205.85 ns, 195.3878 ms/op
Result 6: 4 op, 784720068.15 ns, 196.1800 ms/op
Result 7: 4 op, 784614867.05 ns, 196.1537 ms/op
Result 8: 4 op, 793929012.92 ns, 198.4823 ms/op
Result 9: 4 op, 791771392.6 ns, 197.9428 ms/op
Result 10: 4 op, 785067032.2 ns, 196.2668 ms/op
Mean = 195.6211 ms, StdError = 0.2437 ms (0.12%); N = 20, StdDev = 1.0898 ms
Min = 194.0218 ms, Q1 = 194.9312 ms, Median = 195.3487 ms, Q3 = 196.1669 ms, Max = 198.4823 ms
IQR = 1.2356 ms, LowerFence = 193.0777 ms, UpperFence = 198.0203 ms
ConfidenceInterval = [195.1435 ms; 196.0988 ms] (CI 95%)
Skewness = 1.1308800783371, Kurtosis = 3.7780939625036
// **************************
// Benchmark: Benchmarking_IListForWithoutOptimization
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 2152657339.79 ns, 538.1643 ms/op
IdleWarmup 1: 4 op, 3136.08 ns, 784.0190 ns/op
IdleWarmup 2: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 7: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 1: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 2: 4 op, 3136.08 ns, 784.0190 ns/op
IdleTarget 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 4: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 7: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 10: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 11: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 16: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 17: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 19: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 20: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 21: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 22: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 23: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 24: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 25: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 2153651190.8 ns, 538.4128 ms/op
MainWarmup 2: 4 op, 2152844649.06 ns, 538.2112 ms/op
MainWarmup 3: 4 op, 2150337783.9 ns, 537.5844 ms/op
MainWarmup 4: 4 op, 2155792560.54 ns, 538.9481 ms/op
MainWarmup 5: 4 op, 2146826234.02 ns, 536.7066 ms/op
MainWarmup 6: 4 op, 2140261856.65 ns, 535.0655 ms/op
MainWarmup 7: 4 op, 2149751907.87 ns, 537.4380 ms/op
MainWarmup 8: 4 op, 2150259952.19 ns, 537.5650 ms/op
MainWarmup 9: 4 op, 2154097083.79 ns, 538.5243 ms/op
MainWarmup 10: 4 op, 2152277589.49 ns, 538.0694 ms/op
MainTarget 1: 4 op, 2149733661.61 ns, 537.4334 ms/op
MainTarget 2: 4 op, 2157520538.45 ns, 539.3801 ms/op
MainTarget 3: 4 op, 2154424661.19 ns, 538.6062 ms/op
MainTarget 4: 4 op, 2146021687.96 ns, 536.5054 ms/op
MainTarget 5: 4 op, 2152935025.07 ns, 538.2338 ms/op
MainTarget 6: 4 op, 2150958156.76 ns, 537.7395 ms/op
MainTarget 7: 4 op, 2140718298.26 ns, 535.1796 ms/op
MainTarget 8: 4 op, 2147107910.67 ns, 536.7770 ms/op
MainTarget 9: 4 op, 2153271155.4 ns, 538.3178 ms/op
MainTarget 10: 4 op, 2151148031.91 ns, 537.7870 ms/op
Result 1: 4 op, 2149733091.42 ns, 537.4333 ms/op
Result 2: 4 op, 2157519968.25 ns, 539.3800 ms/op
Result 3: 4 op, 2154424090.99 ns, 538.6060 ms/op
Result 4: 4 op, 2146021117.77 ns, 536.5053 ms/op
Result 5: 4 op, 2152934454.87 ns, 538.2336 ms/op
Result 6: 4 op, 2150957586.57 ns, 537.7394 ms/op
Result 7: 4 op, 2140717728.07 ns, 535.1794 ms/op
Result 8: 4 op, 2147107340.47 ns, 536.7768 ms/op
Result 9: 4 op, 2153270585.2 ns, 538.3176 ms/op
Result 10: 4 op, 2151147461.72 ns, 537.7869 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 2146005722.48 ns, 536.5014 ms/op
IdleWarmup 1: 4 op, 3136.08 ns, 784.0190 ns/op
IdleWarmup 2: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 6: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2565.88 ns, 641.4701 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 11: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 12: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 2140308327.59 ns, 535.0771 ms/op
MainWarmup 2: 4 op, 2151060221.78 ns, 537.7651 ms/op
MainWarmup 3: 4 op, 2152756838.93 ns, 538.1892 ms/op
MainWarmup 4: 4 op, 2143669630.92 ns, 535.9174 ms/op
MainWarmup 5: 4 op, 2146000305.62 ns, 536.5001 ms/op
MainWarmup 6: 4 op, 2144380664.89 ns, 536.0952 ms/op
MainTarget 1: 4 op, 2148934247.32 ns, 537.2336 ms/op
MainTarget 2: 4 op, 2142805784.52 ns, 535.7014 ms/op
MainTarget 3: 4 op, 2178023633.47 ns, 544.5059 ms/op
MainTarget 4: 4 op, 2162183598.44 ns, 540.5459 ms/op
MainTarget 5: 4 op, 2153236373.46 ns, 538.3091 ms/op
MainTarget 6: 4 op, 2145567527.13 ns, 536.3919 ms/op
MainTarget 7: 4 op, 2150779115.33 ns, 537.6948 ms/op
MainTarget 8: 4 op, 2142390682.09 ns, 535.5977 ms/op
MainTarget 9: 4 op, 2148387429.69 ns, 537.0969 ms/op
MainTarget 10: 4 op, 2140768190.38 ns, 535.1920 ms/op
Result 1: 4 op, 2148933392.03 ns, 537.2333 ms/op
Result 2: 4 op, 2142804929.23 ns, 535.7012 ms/op
Result 3: 4 op, 2178022778.18 ns, 544.5057 ms/op
Result 4: 4 op, 2162182743.14 ns, 540.5457 ms/op
Result 5: 4 op, 2153235518.17 ns, 538.3089 ms/op
Result 6: 4 op, 2145566671.84 ns, 536.3917 ms/op
Result 7: 4 op, 2150778260.04 ns, 537.6946 ms/op
Result 8: 4 op, 2142389826.8 ns, 535.5975 ms/op
Result 9: 4 op, 2148386574.4 ns, 537.0966 ms/op
Result 10: 4 op, 2140767335.09 ns, 535.1918 ms/op
Mean = 537.7113 ms, StdError = 0.4724 ms (0.09%); N = 20, StdDev = 2.1127 ms
Min = 535.1794 ms, Q1 = 536.4485 ms, Median = 537.5639 ms, Q3 = 538.3133 ms, Max = 544.5057 ms
IQR = 1.8648 ms, LowerFence = 533.6513 ms, UpperFence = 541.1104 ms
ConfidenceInterval = [536.7853 ms; 538.6372 ms] (CI 95%)
Skewness = 1.52361871649893, Kurtosis = 5.84304244305453
// **************************
// Benchmark: Benchmarking_IListForWithOptimization
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 1287592998.91 ns, 321.8982 ms/op
IdleWarmup 1: 4 op, 3706.27 ns, 926.5679 ns/op
IdleWarmup 2: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 10: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 11: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 14: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2565.88 ns, 641.4701 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 2280.78 ns, 570.1956 ns/op
IdleTarget 11: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 13: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 14: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 16: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 17: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 18: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 19: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 20: 4 op, 570.2 ns, 142.5489 ns/op
MainWarmup 1: 4 op, 1289836433.68 ns, 322.4591 ms/op
MainWarmup 2: 4 op, 1299472740.09 ns, 324.8682 ms/op
MainWarmup 3: 4 op, 1292236102.05 ns, 323.0590 ms/op
MainWarmup 4: 4 op, 1287624929.87 ns, 321.9062 ms/op
MainWarmup 5: 4 op, 1285662886.65 ns, 321.4157 ms/op
MainWarmup 6: 4 op, 1297210203.77 ns, 324.3026 ms/op
MainWarmup 7: 4 op, 1299560550.22 ns, 324.8901 ms/op
MainWarmup 8: 4 op, 1296058408.56 ns, 324.0146 ms/op
MainTarget 1: 4 op, 1294246611.9 ns, 323.5617 ms/op
MainTarget 2: 4 op, 1286421246.86 ns, 321.6053 ms/op
MainTarget 3: 4 op, 1292567670.82 ns, 323.1419 ms/op
MainTarget 4: 4 op, 1290630431.11 ns, 322.6576 ms/op
MainTarget 5: 4 op, 1296133959.48 ns, 324.0335 ms/op
MainTarget 6: 4 op, 1294173341.76 ns, 323.5433 ms/op
MainTarget 7: 4 op, 1291461206.17 ns, 322.8653 ms/op
MainTarget 8: 4 op, 1292344724.32 ns, 323.0862 ms/op
MainTarget 9: 4 op, 1290734206.72 ns, 322.6836 ms/op
MainTarget 10: 4 op, 1289925384.2 ns, 322.4813 ms/op
Result 1: 4 op, 1294246041.7 ns, 323.5615 ms/op
Result 2: 4 op, 1286420676.66 ns, 321.6052 ms/op
Result 3: 4 op, 1292567100.62 ns, 323.1418 ms/op
Result 4: 4 op, 1290629860.92 ns, 322.6575 ms/op
Result 5: 4 op, 1296133389.29 ns, 324.0333 ms/op
Result 6: 4 op, 1294172771.56 ns, 323.5432 ms/op
Result 7: 4 op, 1291460635.97 ns, 322.8652 ms/op
Result 8: 4 op, 1292344154.13 ns, 323.0860 ms/op
Result 9: 4 op, 1290733636.53 ns, 322.6834 ms/op
Result 10: 4 op, 1289924814 ns, 322.4812 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 1291974952.45 ns, 322.9937 ms/op
IdleWarmup 1: 4 op, 3706.27 ns, 926.5679 ns/op
IdleWarmup 2: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2565.88 ns, 641.4701 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 11: 4 op, 285.1 ns, 71.2745 ns/op
IdleTarget 12: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 16: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 17: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 18: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 19: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 20: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 21: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 22: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 23: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 24: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 25: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 1291470899.5 ns, 322.8677 ms/op
MainWarmup 2: 4 op, 1293625668.84 ns, 323.4064 ms/op
MainWarmup 3: 4 op, 1299245232.02 ns, 324.8113 ms/op
MainWarmup 4: 4 op, 1289543353.12 ns, 322.3858 ms/op
MainWarmup 5: 4 op, 1301314186.92 ns, 325.3285 ms/op
MainWarmup 6: 4 op, 1291929621.89 ns, 322.9824 ms/op
MainTarget 1: 4 op, 1286672132.94 ns, 321.6680 ms/op
MainTarget 2: 4 op, 1287431348.44 ns, 321.8578 ms/op
MainTarget 3: 4 op, 1292606444.12 ns, 323.1516 ms/op
MainTarget 4: 4 op, 1297736494.35 ns, 324.4341 ms/op
MainTarget 5: 4 op, 1297513547.85 ns, 324.3784 ms/op
MainTarget 6: 4 op, 1299041101.98 ns, 324.7603 ms/op
MainTarget 7: 4 op, 1316180612.89 ns, 329.0452 ms/op
MainTarget 8: 4 op, 1293763656.19 ns, 323.4409 ms/op
MainTarget 9: 4 op, 1295420359.63 ns, 323.8551 ms/op
MainTarget 10: 4 op, 1292334745.9 ns, 323.0837 ms/op
Result 1: 4 op, 1286671562.75 ns, 321.6679 ms/op
Result 2: 4 op, 1287430778.25 ns, 321.8577 ms/op
Result 3: 4 op, 1292605873.93 ns, 323.1515 ms/op
Result 4: 4 op, 1297735924.15 ns, 324.4340 ms/op
Result 5: 4 op, 1297512977.65 ns, 324.3782 ms/op
Result 6: 4 op, 1299040531.79 ns, 324.7601 ms/op
Result 7: 4 op, 1316180042.7 ns, 329.0450 ms/op
Result 8: 4 op, 1293763085.99 ns, 323.4408 ms/op
Result 9: 4 op, 1295419789.44 ns, 323.8549 ms/op
Result 10: 4 op, 1292334175.7 ns, 323.0835 ms/op
Mean = 323.4666 ms, StdError = 0.3533 ms (0.11%); N = 20, StdDev = 1.5800 ms
Min = 321.6052 ms, Q1 = 322.6704 ms, Median = 323.1466 ms, Q3 = 323.9441 ms, Max = 329.0450 ms
IQR = 1.2737 ms, LowerFence = 320.7599 ms, UpperFence = 325.8547 ms
ConfidenceInterval = [322.7741 ms; 324.1591 ms] (CI 95%)
Skewness = 2.01382007860177, Kurtosis = 8.05474727288591
// **************************
// Benchmark: Benchmarking_IListForeach
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 2252409361.7 ns, 563.1023 ms/op
IdleWarmup 1: 4 op, 2850.98 ns, 712.7446 ns/op
IdleWarmup 2: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 10: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 11: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 14: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 16: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 17: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 11: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 13: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 14: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 16: 4 op, 285.1 ns, 71.2745 ns/op
IdleTarget 17: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 18: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 19: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 20: 4 op, 285.1 ns, 71.2745 ns/op
IdleTarget 21: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 22: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 23: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 24: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 25: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 26: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 27: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 28: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 29: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 30: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 2262709090.74 ns, 565.6773 ms/op
MainWarmup 2: 4 op, 2257105778.13 ns, 564.2764 ms/op
MainWarmup 3: 4 op, 2269705676.41 ns, 567.4264 ms/op
MainWarmup 4: 4 op, 2264514045.06 ns, 566.1285 ms/op
MainWarmup 5: 4 op, 2256671003.95 ns, 564.1678 ms/op
MainWarmup 6: 4 op, 2244393551.32 ns, 561.0984 ms/op
MainWarmup 7: 4 op, 2247216304.86 ns, 561.8041 ms/op
MainWarmup 8: 4 op, 2253087894.52 ns, 563.2720 ms/op
MainWarmup 9: 4 op, 2257001717.43 ns, 564.2504 ms/op
MainWarmup 10: 4 op, 2266075240.74 ns, 566.5188 ms/op
MainWarmup 11: 4 op, 2256264739.56 ns, 564.0662 ms/op
MainTarget 1: 4 op, 2263224547.61 ns, 565.8061 ms/op
MainTarget 2: 4 op, 2261996346.19 ns, 565.4991 ms/op
MainTarget 3: 4 op, 2270009020.5 ns, 567.5023 ms/op
MainTarget 4: 4 op, 2256384480.64 ns, 564.0961 ms/op
MainTarget 5: 4 op, 2260603928.42 ns, 565.1510 ms/op
MainTarget 6: 4 op, 2267205938.7 ns, 566.8015 ms/op
MainTarget 7: 4 op, 2263327753.02 ns, 565.8319 ms/op
MainTarget 8: 4 op, 2274219915.34 ns, 568.5550 ms/op
MainTarget 9: 4 op, 2261050106.51 ns, 565.2625 ms/op
MainTarget 10: 4 op, 2262345591.02 ns, 565.5864 ms/op
Result 1: 4 op, 2263223977.41 ns, 565.8060 ms/op
Result 2: 4 op, 2261995775.99 ns, 565.4989 ms/op
Result 3: 4 op, 2270008450.3 ns, 567.5021 ms/op
Result 4: 4 op, 2256383910.45 ns, 564.0960 ms/op
Result 5: 4 op, 2260603358.22 ns, 565.1508 ms/op
Result 6: 4 op, 2267205368.51 ns, 566.8013 ms/op
Result 7: 4 op, 2263327182.82 ns, 565.8318 ms/op
Result 8: 4 op, 2274219345.14 ns, 568.5548 ms/op
Result 9: 4 op, 2261049536.32 ns, 565.2624 ms/op
Result 10: 4 op, 2262345020.82 ns, 565.5863 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 2255068469.09 ns, 563.7671 ms/op
IdleWarmup 1: 4 op, 3706.27 ns, 926.5679 ns/op
IdleWarmup 2: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 5: 4 op, 10833.72 ns, 2.7084 us/op
IdleWarmup 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2280.78 ns, 570.1956 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 2251224780.25 ns, 562.8062 ms/op
MainWarmup 2: 4 op, 2254694135.65 ns, 563.6735 ms/op
MainWarmup 3: 4 op, 2249686392.39 ns, 562.4216 ms/op
MainWarmup 4: 4 op, 2252314424.13 ns, 563.0786 ms/op
MainWarmup 5: 4 op, 2251736530.84 ns, 562.9341 ms/op
MainWarmup 6: 4 op, 2251826906.85 ns, 562.9567 ms/op
MainTarget 1: 4 op, 2252151633.27 ns, 563.0379 ms/op
MainTarget 2: 4 op, 2251245022.19 ns, 562.8113 ms/op
MainTarget 3: 4 op, 2255169963.92 ns, 563.7925 ms/op
MainTarget 4: 4 op, 2250076976.41 ns, 562.5192 ms/op
MainTarget 5: 4 op, 2261821296.12 ns, 565.4553 ms/op
MainTarget 6: 4 op, 2255484141.72 ns, 563.8710 ms/op
MainTarget 7: 4 op, 2258309461.14 ns, 564.5774 ms/op
MainTarget 8: 4 op, 2257149968.3 ns, 564.2875 ms/op
MainTarget 9: 4 op, 2250912027.94 ns, 562.7280 ms/op
MainTarget 10: 4 op, 2255544582.46 ns, 563.8861 ms/op
Result 1: 4 op, 2252150777.97 ns, 563.0377 ms/op
Result 2: 4 op, 2251244166.9 ns, 562.8110 ms/op
Result 3: 4 op, 2255169108.62 ns, 563.7923 ms/op
Result 4: 4 op, 2250076121.12 ns, 562.5190 ms/op
Result 5: 4 op, 2261820440.83 ns, 565.4551 ms/op
Result 6: 4 op, 2255483286.43 ns, 563.8708 ms/op
Result 7: 4 op, 2258308605.85 ns, 564.5772 ms/op
Result 8: 4 op, 2257149113 ns, 564.2873 ms/op
Result 9: 4 op, 2250911172.64 ns, 562.7278 ms/op
Result 10: 4 op, 2255543727.16 ns, 563.8859 ms/op
Mean = 564.8527 ms, StdError = 0.3605 ms (0.06%); N = 20, StdDev = 1.6121 ms
Min = 562.5190 ms, Q1 = 563.8315 ms, Median = 564.8640 ms, Q3 = 565.6961 ms, Max = 568.5548 ms
IQR = 1.8646 ms, LowerFence = 561.0347 ms, UpperFence = 568.4930 ms
ConfidenceInterval = [564.1462 ms; 565.5593 ms] (CI 95%)
Skewness = 0.465949606560751, Kurtosis = 2.48486618630672
// **************************
// Benchmark: Benchmarking_ListForWithoutOptimization
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 336585919.36 ns, 84.1465 ms/op
IdleWarmup 1: 4 op, 3421.17 ns, 855.2935 ns/op
IdleWarmup 2: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2280.78 ns, 570.1956 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 11: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 12: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 15: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 16: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 17: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 19: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 20: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 21: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 22: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 23: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 24: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 25: 4 op, 570.2 ns, 142.5489 ns/op
MainWarmup 1: 4 op, 337413273.24 ns, 84.3533 ms/op
MainWarmup 2: 4 op, 336231827.86 ns, 84.0580 ms/op
MainWarmup 3: 4 op, 360637056.79 ns, 90.1593 ms/op
MainWarmup 4: 4 op, 337457463.4 ns, 84.3644 ms/op
MainWarmup 5: 4 op, 339180309.55 ns, 84.7951 ms/op
MainWarmup 6: 4 op, 334779824.65 ns, 83.6950 ms/op
MainTarget 1: 4 op, 333294179.9 ns, 83.3235 ms/op
MainTarget 2: 4 op, 337098525.25 ns, 84.2746 ms/op
MainTarget 3: 4 op, 337032667.65 ns, 84.2582 ms/op
MainTarget 4: 4 op, 349944748.04 ns, 87.4862 ms/op
MainTarget 5: 4 op, 352759803.94 ns, 88.1900 ms/op
MainTarget 6: 4 op, 366911204.57 ns, 91.7278 ms/op
MainTarget 7: 4 op, 332622489.43 ns, 83.1556 ms/op
MainTarget 8: 4 op, 343313372.68 ns, 85.8283 ms/op
MainTarget 9: 4 op, 343479584.72 ns, 85.8699 ms/op
MainTarget 10: 4 op, 339633044.89 ns, 84.9083 ms/op
Result 1: 4 op, 333293609.7 ns, 83.3234 ms/op
Result 2: 4 op, 337097955.05 ns, 84.2745 ms/op
Result 3: 4 op, 337032097.45 ns, 84.2580 ms/op
Result 4: 4 op, 349944177.85 ns, 87.4860 ms/op
Result 5: 4 op, 352759233.75 ns, 88.1898 ms/op
Result 6: 4 op, 366910634.38 ns, 91.7277 ms/op
Result 7: 4 op, 332621919.23 ns, 83.1555 ms/op
Result 8: 4 op, 343312802.49 ns, 85.8282 ms/op
Result 9: 4 op, 343479014.52 ns, 85.8698 ms/op
Result 10: 4 op, 339632474.69 ns, 84.9081 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 345656306.59 ns, 86.4141 ms/op
IdleWarmup 1: 4 op, 3421.17 ns, 855.2935 ns/op
IdleWarmup 2: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2280.78 ns, 570.1956 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 7: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 9: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 10: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 11: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 16: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 17: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 348261530.5 ns, 87.0654 ms/op
MainWarmup 2: 4 op, 350932612 ns, 87.7332 ms/op
MainWarmup 3: 4 op, 345683675.98 ns, 86.4209 ms/op
MainWarmup 4: 4 op, 353030931.97 ns, 88.2577 ms/op
MainWarmup 5: 4 op, 347056992.2 ns, 86.7642 ms/op
MainWarmup 6: 4 op, 347360621.38 ns, 86.8402 ms/op
MainTarget 1: 4 op, 343904665.57 ns, 85.9762 ms/op
MainTarget 2: 4 op, 343237536.66 ns, 85.8094 ms/op
MainTarget 3: 4 op, 343876725.98 ns, 85.9692 ms/op
MainTarget 4: 4 op, 332478229.93 ns, 83.1196 ms/op
MainTarget 5: 4 op, 342851229.11 ns, 85.7128 ms/op
MainTarget 6: 4 op, 348233305.81 ns, 87.0583 ms/op
MainTarget 7: 4 op, 344690965.36 ns, 86.1727 ms/op
MainTarget 8: 4 op, 344186627.32 ns, 86.0467 ms/op
MainTarget 9: 4 op, 345357524.07 ns, 86.3394 ms/op
MainTarget 10: 4 op, 345911469.14 ns, 86.4779 ms/op
Result 1: 4 op, 343903810.28 ns, 85.9760 ms/op
Result 2: 4 op, 343236681.37 ns, 85.8092 ms/op
Result 3: 4 op, 343875870.69 ns, 85.9690 ms/op
Result 4: 4 op, 332477374.64 ns, 83.1193 ms/op
Result 5: 4 op, 342850373.82 ns, 85.7126 ms/op
Result 6: 4 op, 348232450.52 ns, 87.0581 ms/op
Result 7: 4 op, 344690110.07 ns, 86.1725 ms/op
Result 8: 4 op, 344185772.02 ns, 86.0464 ms/op
Result 9: 4 op, 345356668.78 ns, 86.3392 ms/op
Result 10: 4 op, 345910613.85 ns, 86.4777 ms/op
Mean = 85.8850 ms, StdError = 0.4352 ms (0.51%); N = 20, StdDev = 1.9462 ms
Min = 83.1193 ms, Q1 = 84.5913 ms, Median = 85.9194 ms, Q3 = 86.4084 ms, Max = 91.7277 ms
IQR = 1.8171 ms, LowerFence = 81.8656 ms, UpperFence = 89.1341 ms
ConfidenceInterval = [85.0321 ms; 86.7380 ms] (CI 95%)
Skewness = 1.01752487296379, Kurtosis = 4.78825831143708
// **************************
// Benchmark: Benchmarking_ListForWithOptimization
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 338364644.68 ns, 84.5912 ms/op
IdleWarmup 1: 4 op, 2850.98 ns, 712.7446 ns/op
IdleWarmup 2: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 3: 4 op, 1140.39 ns, 285.0978 ns/op
IdleWarmup 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2850.98 ns, 712.7446 ns/op
IdleTarget 3: 4 op, 1425.49 ns, 356.3723 ns/op
IdleTarget 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 11: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 12: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 13: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 14: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 15: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 16: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 17: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 19: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 20: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 21: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 22: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 23: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 24: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 25: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 362998522.05 ns, 90.7496 ms/op
MainWarmup 2: 4 op, 350710805.89 ns, 87.6777 ms/op
MainWarmup 3: 4 op, 371674904.09 ns, 92.9187 ms/op
MainWarmup 4: 4 op, 346941812.67 ns, 86.7355 ms/op
MainWarmup 5: 4 op, 348255258.34 ns, 87.0638 ms/op
MainWarmup 6: 4 op, 342304696.59 ns, 85.5762 ms/op
MainTarget 1: 4 op, 345933706.77 ns, 86.4834 ms/op
MainTarget 2: 4 op, 345235787.3 ns, 86.3089 ms/op
MainTarget 3: 4 op, 351864596.78 ns, 87.9661 ms/op
MainTarget 4: 4 op, 357984506.64 ns, 89.4961 ms/op
MainTarget 5: 4 op, 341965430.18 ns, 85.4914 ms/op
MainTarget 6: 4 op, 347857261.78 ns, 86.9643 ms/op
MainTarget 7: 4 op, 342654226.52 ns, 85.6636 ms/op
MainTarget 8: 4 op, 352964219.08 ns, 88.2411 ms/op
MainTarget 9: 4 op, 353302060 ns, 88.3255 ms/op
MainTarget 10: 4 op, 350262347.02 ns, 87.5656 ms/op
Result 1: 4 op, 345932851.48 ns, 86.4832 ms/op
Result 2: 4 op, 345234932.01 ns, 86.3087 ms/op
Result 3: 4 op, 351863741.49 ns, 87.9659 ms/op
Result 4: 4 op, 357983651.35 ns, 89.4959 ms/op
Result 5: 4 op, 341964574.88 ns, 85.4911 ms/op
Result 6: 4 op, 347856406.49 ns, 86.9641 ms/op
Result 7: 4 op, 342653371.22 ns, 85.6633 ms/op
Result 8: 4 op, 352963363.79 ns, 88.2408 ms/op
Result 9: 4 op, 353301204.71 ns, 88.3253 ms/op
Result 10: 4 op, 350261491.72 ns, 87.5654 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 347436172.3 ns, 86.8590 ms/op
IdleWarmup 1: 4 op, 2850.98 ns, 712.7446 ns/op
IdleWarmup 2: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2280.78 ns, 570.1956 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 6: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 11: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 12: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 15: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 16: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 17: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 19: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 20: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 21: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 22: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 23: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 351247359.99 ns, 87.8118 ms/op
MainWarmup 2: 4 op, 340353772.19 ns, 85.0884 ms/op
MainWarmup 3: 4 op, 345158810.89 ns, 86.2897 ms/op
MainWarmup 4: 4 op, 344704364.96 ns, 86.1761 ms/op
MainWarmup 5: 4 op, 355120128.82 ns, 88.7800 ms/op
MainWarmup 6: 4 op, 359069018.76 ns, 89.7673 ms/op
MainWarmup 7: 4 op, 334179693.74 ns, 83.5449 ms/op
MainTarget 1: 4 op, 334378406.92 ns, 83.5946 ms/op
MainTarget 2: 4 op, 350082165.19 ns, 87.5205 ms/op
MainTarget 3: 4 op, 334979108.03 ns, 83.7448 ms/op
MainTarget 4: 4 op, 344416986.36 ns, 86.1042 ms/op
MainTarget 5: 4 op, 345189316.36 ns, 86.2973 ms/op
MainTarget 6: 4 op, 345467286.74 ns, 86.3668 ms/op
MainTarget 7: 4 op, 342472334.11 ns, 85.6181 ms/op
MainTarget 8: 4 op, 344696952.42 ns, 86.1742 ms/op
MainTarget 9: 4 op, 347512293.42 ns, 86.8781 ms/op
MainTarget 10: 4 op, 343383791.85 ns, 85.8459 ms/op
Result 1: 4 op, 334377551.63 ns, 83.5944 ms/op
Result 2: 4 op, 350081309.9 ns, 87.5203 ms/op
Result 3: 4 op, 334978252.74 ns, 83.7446 ms/op
Result 4: 4 op, 344416131.06 ns, 86.1040 ms/op
Result 5: 4 op, 345188461.06 ns, 86.2971 ms/op
Result 6: 4 op, 345466431.44 ns, 86.3666 ms/op
Result 7: 4 op, 342471478.81 ns, 85.6179 ms/op
Result 8: 4 op, 344696097.12 ns, 86.1740 ms/op
Result 9: 4 op, 347511438.12 ns, 86.8779 ms/op
Result 10: 4 op, 343382936.55 ns, 85.8457 ms/op
Mean = 86.5323 ms, StdError = 0.3217 ms (0.37%); N = 20, StdDev = 1.4385 ms
Min = 83.5944 ms, Q1 = 85.7545 ms, Median = 86.3377 ms, Q3 = 87.5429 ms, Max = 89.4959 ms
IQR = 1.7883 ms, LowerFence = 83.0721 ms, UpperFence = 90.2253 ms
ConfidenceInterval = [85.9019 ms; 87.1628 ms] (CI 95%)
Skewness = -0.136643557649073, Kurtosis = 2.80204030555978
// **************************
// Benchmark: Benchmarking_ListForeach
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 901747877.73 ns, 225.4370 ms/op
IdleWarmup 1: 4 op, 4276.47 ns, 1.0691 us/op
IdleWarmup 2: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2565.88 ns, 641.4701 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 11: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 12: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 16: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 17: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 19: 4 op, 855.29 ns, 213.8234 ns/op
MainWarmup 1: 4 op, 902291844.38 ns, 225.5730 ms/op
MainWarmup 2: 4 op, 903387190.21 ns, 225.8468 ms/op
MainWarmup 3: 4 op, 897571764.82 ns, 224.3929 ms/op
MainWarmup 4: 4 op, 903220122.89 ns, 225.8050 ms/op
MainWarmup 5: 4 op, 891242022.96 ns, 222.8105 ms/op
MainWarmup 6: 4 op, 899087344.85 ns, 224.7718 ms/op
MainTarget 1: 4 op, 908849664.5 ns, 227.2124 ms/op
MainTarget 2: 4 op, 920905025.93 ns, 230.2263 ms/op
MainTarget 3: 4 op, 894536043.21 ns, 223.6340 ms/op
MainTarget 4: 4 op, 901469337.16 ns, 225.3673 ms/op
MainTarget 5: 4 op, 897507617.81 ns, 224.3769 ms/op
MainTarget 6: 4 op, 908331071.56 ns, 227.0828 ms/op
MainTarget 7: 4 op, 898717572.97 ns, 224.6794 ms/op
MainTarget 8: 4 op, 897120454.97 ns, 224.2801 ms/op
MainTarget 9: 4 op, 906463680.82 ns, 226.6159 ms/op
MainTarget 10: 4 op, 899113288.75 ns, 224.7783 ms/op
Result 1: 4 op, 908848809.2 ns, 227.2122 ms/op
Result 2: 4 op, 920904170.64 ns, 230.2260 ms/op
Result 3: 4 op, 894535187.91 ns, 223.6338 ms/op
Result 4: 4 op, 901468481.87 ns, 225.3671 ms/op
Result 5: 4 op, 897506762.52 ns, 224.3767 ms/op
Result 6: 4 op, 908330216.26 ns, 227.0826 ms/op
Result 7: 4 op, 898716717.68 ns, 224.6792 ms/op
Result 8: 4 op, 897119599.68 ns, 224.2799 ms/op
Result 9: 4 op, 906462825.52 ns, 226.6157 ms/op
Result 10: 4 op, 899112433.46 ns, 224.7781 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 908240695.55 ns, 227.0602 ms/op
IdleWarmup 1: 4 op, 2850.98 ns, 712.7446 ns/op
IdleWarmup 2: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 9: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2280.78 ns, 570.1956 ns/op
IdleTarget 3: 4 op, 1140.39 ns, 285.0978 ns/op
IdleTarget 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 7: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 8: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 9: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 10: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 11: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 12: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 13: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 14: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 15: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 16: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 17: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 18: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 19: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 20: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 21: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 22: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 23: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 24: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 25: 4 op, 570.2 ns, 142.5489 ns/op
MainWarmup 1: 4 op, 913074529.13 ns, 228.2686 ms/op
MainWarmup 2: 4 op, 898849003.07 ns, 224.7123 ms/op
MainWarmup 3: 4 op, 887683717.04 ns, 221.9209 ms/op
MainWarmup 4: 4 op, 901331349.81 ns, 225.3328 ms/op
MainWarmup 5: 4 op, 912533698.56 ns, 228.1334 ms/op
MainWarmup 6: 4 op, 902326626.31 ns, 225.5817 ms/op
MainWarmup 7: 4 op, 893206061.86 ns, 223.3015 ms/op
MainWarmup 8: 4 op, 898824484.66 ns, 224.7061 ms/op
MainWarmup 9: 4 op, 951029887.37 ns, 237.7575 ms/op
MainWarmup 10: 4 op, 891241167.67 ns, 222.8103 ms/op
MainTarget 1: 4 op, 896223537.22 ns, 224.0559 ms/op
MainTarget 2: 4 op, 906989401.2 ns, 226.7474 ms/op
MainTarget 3: 4 op, 902670169.19 ns, 225.6675 ms/op
MainTarget 4: 4 op, 898239749.02 ns, 224.5599 ms/op
MainTarget 5: 4 op, 900967850.09 ns, 225.2420 ms/op
MainTarget 6: 4 op, 896528591.89 ns, 224.1321 ms/op
MainTarget 7: 4 op, 891579293.69 ns, 222.8948 ms/op
MainTarget 8: 4 op, 903333021.63 ns, 225.8333 ms/op
MainTarget 9: 4 op, 900391667.39 ns, 225.0979 ms/op
MainTarget 10: 4 op, 908447676.57 ns, 227.1119 ms/op
Result 1: 4 op, 896222967.02 ns, 224.0557 ms/op
Result 2: 4 op, 906988831.01 ns, 226.7472 ms/op
Result 3: 4 op, 902669598.99 ns, 225.6674 ms/op
Result 4: 4 op, 898239178.83 ns, 224.5598 ms/op
Result 5: 4 op, 900967279.89 ns, 225.2418 ms/op
Result 6: 4 op, 896528021.69 ns, 224.1320 ms/op
Result 7: 4 op, 891578723.49 ns, 222.8947 ms/op
Result 8: 4 op, 903332451.43 ns, 225.8331 ms/op
Result 9: 4 op, 900391097.19 ns, 225.0978 ms/op
Result 10: 4 op, 908447106.37 ns, 227.1118 ms/op
Mean = 225.4796 ms, StdError = 0.3721 ms (0.17%); N = 20, StdDev = 1.6639 ms
Min = 222.8947 ms, Q1 = 224.3283 ms, Median = 225.1698 ms, Q3 = 226.6815 ms, Max = 230.2260 ms
IQR = 2.3532 ms, LowerFence = 220.7986 ms, UpperFence = 230.2112 ms
ConfidenceInterval = [224.7504 ms; 226.2089 ms] (CI 95%)
Skewness = 0.982030782111596, Kurtosis = 3.93410762278694
// **************************
// Benchmark: Benchmarking_ListForEach
// *** Generate ***
// Result = Success
// BinariesDirectoryPath = C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release
\net461\win7-x64
// *** Build ***
BuildScript: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\win7-x
64\BDN.Auto.bat
// Result = Success
// *** Execute ***
// Launch: 1
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 1083538223.64 ns, 270.8846 ms/op
IdleWarmup 1: 4 op, 4846.66 ns, 1.2117 us/op
IdleWarmup 2: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 2565.88 ns, 641.4701 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 5: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 10: 4 op, 1710.59 ns, 427.6467 ns/op
MainWarmup 1: 4 op, 1080643910.54 ns, 270.1610 ms/op
MainWarmup 2: 4 op, 1076396238.08 ns, 269.0991 ms/op
MainWarmup 3: 4 op, 1079898379.73 ns, 269.9746 ms/op
MainWarmup 4: 4 op, 1087498232.39 ns, 271.8746 ms/op
MainWarmup 5: 4 op, 1082697470.16 ns, 270.6744 ms/op
MainWarmup 6: 4 op, 1077934625.93 ns, 269.4837 ms/op
MainWarmup 7: 4 op, 1071851493.68 ns, 267.9629 ms/op
MainWarmup 8: 4 op, 1085080602.86 ns, 271.2702 ms/op
MainWarmup 9: 4 op, 1088411970.92 ns, 272.1030 ms/op
MainWarmup 10: 4 op, 1067111742.38 ns, 266.7779 ms/op
MainTarget 1: 4 op, 1083829878.71 ns, 270.9575 ms/op
MainTarget 2: 4 op, 1077875325.58 ns, 269.4688 ms/op
MainTarget 3: 4 op, 1077400637.71 ns, 269.3502 ms/op
MainTarget 4: 4 op, 1075968306.25 ns, 268.9921 ms/op
MainTarget 5: 4 op, 1075701454.68 ns, 268.9254 ms/op
MainTarget 6: 4 op, 1074529702.63 ns, 268.6324 ms/op
MainTarget 7: 4 op, 1081260006.93 ns, 270.3150 ms/op
MainTarget 8: 4 op, 1077042269.74 ns, 269.2606 ms/op
MainTarget 9: 4 op, 1072703651.08 ns, 268.1759 ms/op
MainTarget 10: 4 op, 1077030580.73 ns, 269.2576 ms/op
Result 1: 4 op, 1083829023.41 ns, 270.9573 ms/op
Result 2: 4 op, 1077874470.29 ns, 269.4686 ms/op
Result 3: 4 op, 1077399782.41 ns, 269.3499 ms/op
Result 4: 4 op, 1075967450.95 ns, 268.9919 ms/op
Result 5: 4 op, 1075700599.39 ns, 268.9251 ms/op
Result 6: 4 op, 1074528847.34 ns, 268.6322 ms/op
Result 7: 4 op, 1081259151.64 ns, 270.3148 ms/op
Result 8: 4 op, 1077041414.45 ns, 269.2604 ms/op
Result 9: 4 op, 1072702795.78 ns, 268.1757 ms/op
Result 10: 4 op, 1077029725.44 ns, 269.2574 ms/op
// Launch: 2
// Benchmark Process Environment Information:
// CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
// GC=Concurrent Workstation
Pilot 1: 4 op, 1082627050.99 ns, 270.6568 ms/op
IdleWarmup 1: 4 op, 3991.37 ns, 997.8424 ns/op
IdleWarmup 2: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 3: 4 op, 570.2 ns, 142.5489 ns/op
IdleWarmup 4: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleWarmup 6: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 1: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 2: 4 op, 1995.68 ns, 498.9212 ns/op
IdleTarget 3: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 4: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 5: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 6: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 7: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 8: 4 op, 855.29 ns, 213.8234 ns/op
IdleTarget 9: 4 op, 570.2 ns, 142.5489 ns/op
IdleTarget 10: 4 op, 1995.68 ns, 498.9212 ns/op
MainWarmup 1: 4 op, 1082612511 ns, 270.6531 ms/op
MainWarmup 2: 4 op, 1082988555.03 ns, 270.7471 ms/op
MainWarmup 3: 4 op, 1076826735.79 ns, 269.2067 ms/op
MainWarmup 4: 4 op, 1077725079.03 ns, 269.4313 ms/op
MainWarmup 5: 4 op, 1081372905.67 ns, 270.3432 ms/op
MainWarmup 6: 4 op, 1079041660.77 ns, 269.7604 ms/op
MainTarget 1: 4 op, 1069150191.81 ns, 267.2875 ms/op
MainTarget 2: 4 op, 1080006431.81 ns, 270.0016 ms/op
MainTarget 3: 4 op, 1079962811.84 ns, 269.9907 ms/op
MainTarget 4: 4 op, 1085458072.37 ns, 271.3645 ms/op
MainTarget 5: 4 op, 1078232553.15 ns, 269.5581 ms/op
MainTarget 6: 4 op, 1079403164.81 ns, 269.8508 ms/op
MainTarget 7: 4 op, 1084808619.53 ns, 271.2022 ms/op
MainTarget 8: 4 op, 1088270847.49 ns, 272.0677 ms/op
MainTarget 9: 4 op, 1082069114.55 ns, 270.5173 ms/op
MainTarget 10: 4 op, 1083531381.29 ns, 270.8828 ms/op
Result 1: 4 op, 1069149336.52 ns, 267.2873 ms/op
Result 2: 4 op, 1080005576.51 ns, 270.0014 ms/op
Result 3: 4 op, 1079961956.55 ns, 269.9905 ms/op
Result 4: 4 op, 1085457217.08 ns, 271.3643 ms/op
Result 5: 4 op, 1078231697.86 ns, 269.5579 ms/op
Result 6: 4 op, 1079402309.52 ns, 269.8506 ms/op
Result 7: 4 op, 1084807764.24 ns, 271.2019 ms/op
Result 8: 4 op, 1088269992.2 ns, 272.0675 ms/op
Result 9: 4 op, 1082068259.26 ns, 270.5171 ms/op
Result 10: 4 op, 1083530525.99 ns, 270.8826 ms/op
Mean = 269.8027 ms, StdError = 0.2596 ms (0.1%); N = 20, StdDev = 1.1611 ms
Min = 267.2873 ms, Q1 = 269.1246 ms, Median = 269.7043 ms, Q3 = 270.6998 ms, Max = 272.0675 ms
IQR = 1.5752 ms, LowerFence = 266.7618 ms, UpperFence = 273.0626 ms
ConfidenceInterval = [269.2939 ms; 270.3116 ms] (CI 95%)
Skewness = -0.0647182954768634, Kurtosis = 2.46867309869827
// ***** BenchmarkRunner: Finish *****
// * Export *
BenchmarkDotNet.Artifacts\results\Benchmarking-report.csv
BenchmarkDotNet.Artifacts\results\Benchmarking-report-github.md
BenchmarkDotNet.Artifacts\results\Benchmarking-report.html
// * Detailed results *
Benchmarking_ArrayForWithoutOptimization
Mean = 44.5821 ms, StdError = 0.2699 ms (0.61%); N = 20, StdDev = 1.2068 ms
Min = 43.0719 ms, Q1 = 44.0250 ms, Median = 44.1867 ms, Q3 = 45.0012 ms, Max = 48.7039 ms
IQR = 0.9762 ms, LowerFence = 42.5607 ms, UpperFence = 46.4655 ms
ConfidenceInterval = [44.0532 ms; 45.1110 ms] (CI 95%)
Skewness = 1.98262725906963, Kurtosis = 7.24746174322024
Benchmarking_ArrayForWithOptimization
Mean = 43.9289 ms, StdError = 0.2302 ms (0.52%); N = 20, StdDev = 1.0294 ms
Min = 42.3739 ms, Q1 = 43.4422 ms, Median = 43.9271 ms, Q3 = 44.0968 ms, Max = 47.3532 ms
IQR = 0.6546 ms, LowerFence = 42.4603 ms, UpperFence = 45.0788 ms
ConfidenceInterval = [43.4778 ms; 44.3801 ms] (CI 95%)
Skewness = 1.54015714423007, Kurtosis = 6.686931379051
Benchmarking_ArrayForeach
Mean = 44.1142 ms, StdError = 0.2221 ms (0.5%); N = 20, StdDev = 0.9931 ms
Min = 42.4203 ms, Q1 = 43.6402 ms, Median = 43.9161 ms, Q3 = 44.7960 ms, Max = 46.9002 ms
IQR = 1.1557 ms, LowerFence = 41.9066 ms, UpperFence = 46.5296 ms
ConfidenceInterval = [43.6790 ms; 44.5495 ms] (CI 95%)
Skewness = 0.736016512781707, Kurtosis = 3.94626009271328
Benchmarking_ArrayForEach
Mean = 195.6211 ms, StdError = 0.2437 ms (0.12%); N = 20, StdDev = 1.0898 ms
Min = 194.0218 ms, Q1 = 194.9312 ms, Median = 195.3487 ms, Q3 = 196.1669 ms, Max = 198.4823 ms
IQR = 1.2356 ms, LowerFence = 193.0777 ms, UpperFence = 198.0203 ms
ConfidenceInterval = [195.1435 ms; 196.0988 ms] (CI 95%)
Skewness = 1.1308800783371, Kurtosis = 3.7780939625036
Benchmarking_IListForWithoutOptimization
Mean = 537.7113 ms, StdError = 0.4724 ms (0.09%); N = 20, StdDev = 2.1127 ms
Min = 535.1794 ms, Q1 = 536.4485 ms, Median = 537.5639 ms, Q3 = 538.3133 ms, Max = 544.5057 ms
IQR = 1.8648 ms, LowerFence = 533.6513 ms, UpperFence = 541.1104 ms
ConfidenceInterval = [536.7853 ms; 538.6372 ms] (CI 95%)
Skewness = 1.52361871649893, Kurtosis = 5.84304244305453
Benchmarking_IListForWithOptimization
Mean = 323.4666 ms, StdError = 0.3533 ms (0.11%); N = 20, StdDev = 1.5800 ms
Min = 321.6052 ms, Q1 = 322.6704 ms, Median = 323.1466 ms, Q3 = 323.9441 ms, Max = 329.0450 ms
IQR = 1.2737 ms, LowerFence = 320.7599 ms, UpperFence = 325.8547 ms
ConfidenceInterval = [322.7741 ms; 324.1591 ms] (CI 95%)
Skewness = 2.01382007860177, Kurtosis = 8.05474727288591
Benchmarking_IListForeach
Mean = 564.8527 ms, StdError = 0.3605 ms (0.06%); N = 20, StdDev = 1.6121 ms
Min = 562.5190 ms, Q1 = 563.8315 ms, Median = 564.8640 ms, Q3 = 565.6961 ms, Max = 568.5548 ms
IQR = 1.8646 ms, LowerFence = 561.0347 ms, UpperFence = 568.4930 ms
ConfidenceInterval = [564.1462 ms; 565.5593 ms] (CI 95%)
Skewness = 0.465949606560751, Kurtosis = 2.48486618630672
Benchmarking_ListForWithoutOptimization
Mean = 85.8850 ms, StdError = 0.4352 ms (0.51%); N = 20, StdDev = 1.9462 ms
Min = 83.1193 ms, Q1 = 84.5913 ms, Median = 85.9194 ms, Q3 = 86.4084 ms, Max = 91.7277 ms
IQR = 1.8171 ms, LowerFence = 81.8656 ms, UpperFence = 89.1341 ms
ConfidenceInterval = [85.0321 ms; 86.7380 ms] (CI 95%)
Skewness = 1.01752487296379, Kurtosis = 4.78825831143708
Benchmarking_ListForWithOptimization
Mean = 86.5323 ms, StdError = 0.3217 ms (0.37%); N = 20, StdDev = 1.4385 ms
Min = 83.5944 ms, Q1 = 85.7545 ms, Median = 86.3377 ms, Q3 = 87.5429 ms, Max = 89.4959 ms
IQR = 1.7883 ms, LowerFence = 83.0721 ms, UpperFence = 90.2253 ms
ConfidenceInterval = [85.9019 ms; 87.1628 ms] (CI 95%)
Skewness = -0.136643557649073, Kurtosis = 2.80204030555978
Benchmarking_ListForeach
Mean = 225.4796 ms, StdError = 0.3721 ms (0.17%); N = 20, StdDev = 1.6639 ms
Min = 222.8947 ms, Q1 = 224.3283 ms, Median = 225.1698 ms, Q3 = 226.6815 ms, Max = 230.2260 ms
IQR = 2.3532 ms, LowerFence = 220.7986 ms, UpperFence = 230.2112 ms
ConfidenceInterval = [224.7504 ms; 226.2089 ms] (CI 95%)
Skewness = 0.982030782111596, Kurtosis = 3.93410762278694
Benchmarking_ListForEach
Mean = 269.8027 ms, StdError = 0.2596 ms (0.1%); N = 20, StdDev = 1.1611 ms
Min = 267.2873 ms, Q1 = 269.1246 ms, Median = 269.7043 ms, Q3 = 270.6998 ms, Max = 272.0675 ms
IQR = 1.5752 ms, LowerFence = 266.7618 ms, UpperFence = 273.0626 ms
ConfidenceInterval = [269.2939 ms; 270.3116 ms] (CI 95%)
Skewness = -0.0647182954768634, Kurtosis = 2.46867309869827
Total time: 00:07:07 (427.11 sec)
// * Summary *
Host Process Environment Information:
BenchmarkDotNet.Core=v0.9.9.0
OS=Microsoft Windows NT 6.1.7601 Service Pack 1
Processor=Intel(R) Core(TM) i7-4790 CPU 3.60GHz, ProcessorCount=8
Frequency=3507568 ticks, Resolution=285.0978 ns, Timer=TSC
CLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]
GC=Concurrent Workstation
JitModules=clrjit-v4.6.1087.0
Type=Benchmarking Mode=Throughput
Method | Median | StdDev |
---------------------------- |------------ |---------- |
ArrayForWithoutOptimization | 44.1867 ms | 1.2068 ms |
ArrayForWithOptimization | 43.9271 ms | 1.0294 ms |
ArrayForeach | 43.9161 ms | 0.9931 ms |
ArrayForEach | 195.3487 ms | 1.0898 ms |
IListForWithoutOptimization | 537.5639 ms | 2.1127 ms |
IListForWithOptimization | 323.1466 ms | 1.5800 ms |
IListForeach | 564.8640 ms | 1.6121 ms |
ListForWithoutOptimization | 85.9194 ms | 1.9462 ms |
ListForWithOptimization | 86.3377 ms | 1.4385 ms |
ListForeach | 225.1698 ms | 1.6639 ms |
ListForEach | 269.7043 ms | 1.1611 ms |
// ***** BenchmarkRunner: End *****
Press any key to continue . . .
using System;
using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace ConsoleApp2 {
public class Benchmarking {
private static int[] gArray;
private static List<int> gList;
static Benchmarking() {
var array = new int[100000000];
var rng = new Random(0);
for (int i = 0; i < array.Length; i++)
array[i] = rng.Next();
gArray = array;
gList = new List<int>(array);
}
[Benchmark]
public static int ArrayForWithoutOptimization() {
int[] array = gArray;
int sum = 0;
for (int i = 0; i < array.Length; i++)
sum += array[i];
return sum;
}
[Benchmark]
public static int ArrayForWithOptimization() {
int[] array = gArray;
int length = array.Length;
int sum = 0;
for (int i = 0; i < length; i++)
sum += array[i];
return sum;
}
[Benchmark]
public static int ArrayForeach() {
int[] array = gArray;
int sum = 0;
foreach (var item in array)
sum += item;
return sum;
}
[Benchmark]
public static int ArrayForEach() {
int[] array = gArray;
int sum = 0;
Array.ForEach(array, i => { sum += i; });
return sum;
}
[Benchmark]
public static int IListForWithoutOptimization() {
IList<int> array = gArray;
int sum = 0;
for (int i = 0; i < array.Count; i++)
sum += array[i];
return sum;
}
[Benchmark]
public static int IListForWithOptimization() {
IList<int> array = gArray;
int length = array.Count;
int sum = 0;
for (int i = 0; i < length; i++)
sum += array[i];
return sum;
}
[Benchmark]
public static int IListForeach() {
IList<int> array = gArray;
int sum = 0;
foreach (var item in array)
sum += item;
return sum;
}
[Benchmark]
public static int ListForWithoutOptimization() {
List<int> array = gList;
int sum = 0;
for (int i = 0; i < array.Count; i++)
sum += array[i];
return sum;
}
[Benchmark]
public static int ListForWithOptimization() {
List<int> array = gList;
int length = array.Count;
int sum = 0;
for (int i = 0; i < length; i++)
sum += array[i];
return sum;
}
[Benchmark]
public static int ListForeach() {
List<int> array = gList;
int sum = 0;
foreach (var item in array)
sum += item;
return sum;
}
[Benchmark]
public static int ListForEach() {
List<int> array = gList;
int sum = 0;
array.ForEach(i => { sum += i; });
return sum;
}
}
public class Program {
static void Main(string[] args) {
var summary = BenchmarkRunner.Run<Benchmarking>();
}
}
}
// Type: ConsoleApp2.Benchmarking
// Assembly: ConsoleApp2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 9436B82B-F24C-455D-8DEB-B160B5BB6EBF
// Location: C:\Users\bbarry\Documents\Visual Studio 2015\Projects\ConsoleApp1\src\ConsoleApp2\bin\Release\net461\ConsoleApp2.exe
// Sequence point data from decompiler
.class public auto ansi
ConsoleApp2.Benchmarking
extends [mscorlib]System.Object
{
.class nested private sealed auto ansi beforefieldinit
'<>c__DisplayClass6_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor()
= (01 00 00 00 )
.field public int32 sum
.method public hidebysig specialname rtspecialname instance void
.ctor() cil managed
{
.maxstack 8
// [159 9 - 159 26]
IL_0000: ldarg.0 // this
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>c__DisplayClass6_0'::.ctor
.method assembly hidebysig instance void
'<ArrayForEach>b__0'(
int32 i
) cil managed
{
.maxstack 8
// [164 9 - 164 32]
IL_0000: ldarg.0 // this
IL_0001: ldarg.0 // this
IL_0002: ldfld int32 ConsoleApp2.Benchmarking/'<>c__DisplayClass6_0'::sum
IL_0007: ldarg.1 // i
IL_0008: add
IL_0009: stfld int32 ConsoleApp2.Benchmarking/'<>c__DisplayClass6_0'::sum
IL_000e: ret
} // end of method '<>c__DisplayClass6_0'::'<ArrayForEach>b__0'
} // end of class '<>c__DisplayClass6_0'
.class nested private sealed auto ansi beforefieldinit
'<>c__DisplayClass13_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor()
= (01 00 00 00 )
.field public int32 sum
.method public hidebysig specialname rtspecialname instance void
.ctor() cil managed
{
.maxstack 8
// [175 9 - 175 26]
IL_0000: ldarg.0 // this
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>c__DisplayClass13_0'::.ctor
.method assembly hidebysig instance void
'<ListForEach>b__0'(
int32 i
) cil managed
{
.maxstack 8
// [180 9 - 180 32]
IL_0000: ldarg.0 // this
IL_0001: ldarg.0 // this
IL_0002: ldfld int32 ConsoleApp2.Benchmarking/'<>c__DisplayClass13_0'::sum
IL_0007: ldarg.1 // i
IL_0008: add
IL_0009: stfld int32 ConsoleApp2.Benchmarking/'<>c__DisplayClass13_0'::sum
IL_000e: ret
} // end of method '<>c__DisplayClass13_0'::'<ListForEach>b__0'
} // end of class '<>c__DisplayClass13_0'
.field private static int32[] gArray
.field private static class [mscorlib]System.Collections.Generic.List`1<int32> gList
.method private hidebysig static specialname rtspecialname void
.cctor() cil managed
{
.maxstack 3
.locals init (
[0] int32[] numArray,
[1] class [mscorlib]System.Random random,
[2] int32 index
)
// [22 7 - 22 42]
IL_0000: ldc.i4 100000000 // 0x05f5e100
IL_0005: newarr [mscorlib]System.Int32
IL_000a: stloc.0 // numArray
// [23 7 - 23 36]
IL_000b: ldc.i4.0
IL_000c: newobj instance void [mscorlib]System.Random::.ctor(int32)
IL_0011: stloc.1 // random
// [24 12 - 24 25]
IL_0012: ldc.i4.0
IL_0013: stloc.2 // index
IL_0014: br.s IL_0023
// start of loop, entry point: IL_0023
// [25 9 - 25 40]
IL_0016: ldloc.0 // numArray
IL_0017: ldloc.2 // index
IL_0018: ldloc.1 // random
IL_0019: callvirt instance int32 [mscorlib]System.Random::Next()
IL_001e: stelem.i4
// [24 52 - 24 59]
IL_001f: ldloc.2 // index
IL_0020: ldc.i4.1
IL_0021: add
IL_0022: stloc.2 // index
// [24 27 - 24 50]
IL_0023: ldloc.2 // index
IL_0024: ldloc.0 // numArray
IL_0025: ldlen
IL_0026: conv.i4
IL_0027: blt.s IL_0016
// end of loop
// [26 7 - 26 37]
IL_0029: ldloc.0 // numArray
IL_002a: stsfld int32[] ConsoleApp2.Benchmarking::gArray
// [27 7 - 27 70]
IL_002f: ldloc.0 // numArray
IL_0030: newobj instance void class [mscorlib]System.Collections.Generic.List`1<int32>::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1<!0/*int32*/>)
IL_0035: stsfld class [mscorlib]System.Collections.Generic.List`1<int32> ConsoleApp2.Benchmarking::gList
IL_003a: ret
} // end of method Benchmarking::.cctor
.method public hidebysig static int32
ArrayForWithoutOptimization() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 3
.locals init (
[0] int32[] gArray,
[1] int32 num,
[2] int32 index
)
// [38 7 - 38 41]
IL_0000: ldsfld int32[] ConsoleApp2.Benchmarking::gArray
IL_0005: stloc.0 // gArray
// [39 7 - 39 18]
IL_0006: ldc.i4.0
IL_0007: stloc.1 // num
// [40 12 - 40 25]
IL_0008: ldc.i4.0
IL_0009: stloc.2 // index
IL_000a: br.s IL_0016
// start of loop, entry point: IL_0016
// [41 9 - 41 29]
IL_000c: ldloc.1 // num
IL_000d: ldloc.0 // gArray
IL_000e: ldloc.2 // index
IL_000f: ldelem.i4
IL_0010: add
IL_0011: stloc.1 // num
// [40 50 - 40 57]
IL_0012: ldloc.2 // index
IL_0013: ldc.i4.1
IL_0014: add
IL_0015: stloc.2 // index
// [40 27 - 40 48]
IL_0016: ldloc.2 // index
IL_0017: ldloc.0 // gArray
IL_0018: ldlen
IL_0019: conv.i4
IL_001a: blt.s IL_000c
// end of loop
// [42 7 - 42 18]
IL_001c: ldloc.1 // num
IL_001d: ret
} // end of method Benchmarking::ArrayForWithoutOptimization
.method public hidebysig static int32
ArrayForWithOptimization() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 3
.locals init (
[0] int32[] gArray,
[1] int32 length,
[2] int32 num,
[3] int32 index
)
// [48 7 - 48 41]
IL_0000: ldsfld int32[] ConsoleApp2.Benchmarking::gArray
IL_0005: stloc.0 // gArray
// [49 7 - 49 33]
IL_0006: ldloc.0 // gArray
IL_0007: ldlen
IL_0008: conv.i4
IL_0009: stloc.1 // length
// [50 7 - 50 18]
IL_000a: ldc.i4.0
IL_000b: stloc.2 // num
// [51 12 - 51 25]
IL_000c: ldc.i4.0
IL_000d: stloc.3 // index
IL_000e: br.s IL_001a
// start of loop, entry point: IL_001a
// [52 9 - 52 29]
IL_0010: ldloc.2 // num
IL_0011: ldloc.0 // gArray
IL_0012: ldloc.3 // index
IL_0013: ldelem.i4
IL_0014: add
IL_0015: stloc.2 // num
// [51 43 - 51 50]
IL_0016: ldloc.3 // index
IL_0017: ldc.i4.1
IL_0018: add
IL_0019: stloc.3 // index
// [51 27 - 51 41]
IL_001a: ldloc.3 // index
IL_001b: ldloc.1 // length
IL_001c: blt.s IL_0010
// end of loop
// [53 7 - 53 27]
IL_001e: ldloc.2 // num
IL_001f: ret
} // end of method Benchmarking::ArrayForWithOptimization
.method public hidebysig static int32
ArrayForeach() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 2
.locals init (
[0] int32 num1,
[1] int32[] V_1,
[2] int32 V_2,
[3] int32 num2
)
IL_0000: ldsfld int32[] ConsoleApp2.Benchmarking::gArray
IL_0005: ldc.i4.0
IL_0006: stloc.0 // num1
IL_0007: stloc.1 // V_1
IL_0008: ldc.i4.0
IL_0009: stloc.2 // V_2
IL_000a: br.s IL_0018
// start of loop, entry point: IL_0018
// [61 16 - 61 24]
IL_000c: ldloc.1 // V_1
IL_000d: ldloc.2 // V_2
IL_000e: ldelem.i4
IL_000f: stloc.3 // num2
// [62 9 - 62 21]
IL_0010: ldloc.0 // num1
IL_0011: ldloc.3 // num2
IL_0012: add
IL_0013: stloc.0 // num1
IL_0014: ldloc.2 // V_2
IL_0015: ldc.i4.1
IL_0016: add
IL_0017: stloc.2 // V_2
IL_0018: ldloc.2 // V_2
IL_0019: ldloc.1 // V_1
IL_001a: ldlen
IL_001b: conv.i4
IL_001c: blt.s IL_000c
// end of loop
// [63 7 - 63 28]
IL_001e: ldloc.0 // num1
IL_001f: ret
} // end of method Benchmarking::ArrayForeach
.method public hidebysig static int32
ArrayForEach() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 3
.locals init (
[0] class ConsoleApp2.Benchmarking/'<>c__DisplayClass6_0' cDisplayClass60
)
// [69 7 - 69 118]
IL_0000: newobj instance void ConsoleApp2.Benchmarking/'<>c__DisplayClass6_0'::.ctor()
IL_0005: stloc.0 // cDisplayClass60
IL_0006: ldsfld int32[] ConsoleApp2.Benchmarking::gArray
IL_000b: ldloc.0 // cDisplayClass60
IL_000c: ldc.i4.0
IL_000d: stfld int32 ConsoleApp2.Benchmarking/'<>c__DisplayClass6_0'::sum
IL_0012: ldloc.0 // cDisplayClass60
IL_0013: ldftn instance void ConsoleApp2.Benchmarking/'<>c__DisplayClass6_0'::'<ArrayForEach>b__0'(int32)
IL_0019: newobj instance void class [mscorlib]System.Action`1<int32>::.ctor(object, native int)
IL_001e: call void [mscorlib]System.Array::ForEach<int32>(!!0/*int32*/[], class [mscorlib]System.Action`1<!!0/*int32*/>)
// [75 7 - 75 43]
IL_0023: ldloc.0 // cDisplayClass60
IL_0024: ldfld int32 ConsoleApp2.Benchmarking/'<>c__DisplayClass6_0'::sum
IL_0029: ret
} // end of method Benchmarking::ArrayForEach
.method public hidebysig static int32
IListForWithoutOptimization() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 3
.locals init (
[0] class [mscorlib]System.Collections.Generic.IList`1<int32> gArray,
[1] int32 num,
[2] int32 index
)
// [81 7 - 81 59]
IL_0000: ldsfld int32[] ConsoleApp2.Benchmarking::gArray
IL_0005: stloc.0 // gArray
// [82 7 - 82 18]
IL_0006: ldc.i4.0
IL_0007: stloc.1 // num
// [83 12 - 83 25]
IL_0008: ldc.i4.0
IL_0009: stloc.2 // index
IL_000a: br.s IL_001a
// start of loop, entry point: IL_001a
// [84 9 - 84 29]
IL_000c: ldloc.1 // num
IL_000d: ldloc.0 // gArray
IL_000e: ldloc.2 // index
IL_000f: callvirt instance !0/*int32*/ class [mscorlib]System.Collections.Generic.IList`1<int32>::get_Item(int32)
IL_0014: add
IL_0015: stloc.1 // num
// [83 49 - 83 56]
IL_0016: ldloc.2 // index
IL_0017: ldc.i4.1
IL_0018: add
IL_0019: stloc.2 // index
// [83 27 - 83 47]
IL_001a: ldloc.2 // index
IL_001b: ldloc.0 // gArray
IL_001c: callvirt instance int32 class [mscorlib]System.Collections.Generic.ICollection`1<int32>::get_Count()
IL_0021: blt.s IL_000c
// end of loop
// [85 7 - 85 18]
IL_0023: ldloc.1 // num
IL_0024: ret
} // end of method Benchmarking::IListForWithoutOptimization
.method public hidebysig static int32
IListForWithOptimization() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 3
.locals init (
[0] class [mscorlib]System.Collections.Generic.IList`1<int32> gArray,
[1] int32 count,
[2] int32 num,
[3] int32 index
)
// [91 7 - 91 59]
IL_0000: ldsfld int32[] ConsoleApp2.Benchmarking::gArray
IL_0005: stloc.0 // gArray
// [92 7 - 92 31]
IL_0006: ldloc.0 // gArray
IL_0007: callvirt instance int32 class [mscorlib]System.Collections.Generic.ICollection`1<int32>::get_Count()
IL_000c: stloc.1 // count
// [93 7 - 93 18]
IL_000d: ldc.i4.0
IL_000e: stloc.2 // num
// [94 12 - 94 25]
IL_000f: ldc.i4.0
IL_0010: stloc.3 // index
IL_0011: br.s IL_0021
// start of loop, entry point: IL_0021
// [95 9 - 95 29]
IL_0013: ldloc.2 // num
IL_0014: ldloc.0 // gArray
IL_0015: ldloc.3 // index
IL_0016: callvirt instance !0/*int32*/ class [mscorlib]System.Collections.Generic.IList`1<int32>::get_Item(int32)
IL_001b: add
IL_001c: stloc.2 // num
// [94 42 - 94 49]
IL_001d: ldloc.3 // index
IL_001e: ldc.i4.1
IL_001f: add
IL_0020: stloc.3 // index
// [94 27 - 94 40]
IL_0021: ldloc.3 // index
IL_0022: ldloc.1 // count
IL_0023: blt.s IL_0013
// end of loop
// [96 7 - 96 27]
IL_0025: ldloc.2 // num
IL_0026: ret
} // end of method Benchmarking::IListForWithOptimization
.method public hidebysig static int32
IListForeach() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 2
.locals init (
[0] int32 num1,
[1] class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1,
[2] int32 num2
)
IL_0000: ldsfld int32[] ConsoleApp2.Benchmarking::gArray
IL_0005: ldc.i4.0
IL_0006: stloc.0 // num1
IL_0007: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0/*int32*/> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_000c: stloc.1 // V_1
.try
{
IL_000d: br.s IL_001a
// start of loop, entry point: IL_001a
// [104 16 - 104 24]
IL_000f: ldloc.1 // V_1
IL_0010: callvirt instance !0/*int32*/ class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0015: stloc.2 // num2
// [105 9 - 105 21]
IL_0016: ldloc.0 // num1
IL_0017: ldloc.2 // num2
IL_0018: add
IL_0019: stloc.0 // num1
IL_001a: ldloc.1 // V_1
IL_001b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_0020: brtrue.s IL_000f
// end of loop
IL_0022: leave.s IL_002e
} // end of .try
finally
{
IL_0024: ldloc.1 // V_1
IL_0025: brfalse.s IL_002d
IL_0027: ldloc.1 // V_1
IL_0028: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_002d: endfinally
} // end of finally
// [106 7 - 106 28]
IL_002e: ldloc.0 // num1
IL_002f: ret
} // end of method Benchmarking::IListForeach
.method public hidebysig static int32
ListForWithoutOptimization() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 3
.locals init (
[0] class [mscorlib]System.Collections.Generic.List`1<int32> gList,
[1] int32 num,
[2] int32 index
)
// [112 7 - 112 43]
IL_0000: ldsfld class [mscorlib]System.Collections.Generic.List`1<int32> ConsoleApp2.Benchmarking::gList
IL_0005: stloc.0 // gList
// [113 7 - 113 18]
IL_0006: ldc.i4.0
IL_0007: stloc.1 // num
// [114 12 - 114 25]
IL_0008: ldc.i4.0
IL_0009: stloc.2 // index
IL_000a: br.s IL_001a
// start of loop, entry point: IL_001a
// [115 9 - 115 28]
IL_000c: ldloc.1 // num
IL_000d: ldloc.0 // gList
IL_000e: ldloc.2 // index
IL_000f: callvirt instance !0/*int32*/ class [mscorlib]System.Collections.Generic.List`1<int32>::get_Item(int32)
IL_0014: add
IL_0015: stloc.1 // num
// [114 48 - 114 55]
IL_0016: ldloc.2 // index
IL_0017: ldc.i4.1
IL_0018: add
IL_0019: stloc.2 // index
// [114 27 - 114 46]
IL_001a: ldloc.2 // index
IL_001b: ldloc.0 // gList
IL_001c: callvirt instance int32 class [mscorlib]System.Collections.Generic.List`1<int32>::get_Count()
IL_0021: blt.s IL_000c
// end of loop
// [116 7 - 116 18]
IL_0023: ldloc.1 // num
IL_0024: ret
} // end of method Benchmarking::ListForWithoutOptimization
.method public hidebysig static int32
ListForWithOptimization() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 3
.locals init (
[0] class [mscorlib]System.Collections.Generic.List`1<int32> gList,
[1] int32 count,
[2] int32 num,
[3] int32 index
)
// [122 7 - 122 43]
IL_0000: ldsfld class [mscorlib]System.Collections.Generic.List`1<int32> ConsoleApp2.Benchmarking::gList
IL_0005: stloc.0 // gList
// [123 7 - 123 30]
IL_0006: ldloc.0 // gList
IL_0007: callvirt instance int32 class [mscorlib]System.Collections.Generic.List`1<int32>::get_Count()
IL_000c: stloc.1 // count
// [124 7 - 124 18]
IL_000d: ldc.i4.0
IL_000e: stloc.2 // num
// [125 12 - 125 25]
IL_000f: ldc.i4.0
IL_0010: stloc.3 // index
IL_0011: br.s IL_0021
// start of loop, entry point: IL_0021
// [126 9 - 126 28]
IL_0013: ldloc.2 // num
IL_0014: ldloc.0 // gList
IL_0015: ldloc.3 // index
IL_0016: callvirt instance !0/*int32*/ class [mscorlib]System.Collections.Generic.List`1<int32>::get_Item(int32)
IL_001b: add
IL_001c: stloc.2 // num
// [125 42 - 125 49]
IL_001d: ldloc.3 // index
IL_001e: ldc.i4.1
IL_001f: add
IL_0020: stloc.3 // index
// [125 27 - 125 40]
IL_0021: ldloc.3 // index
IL_0022: ldloc.1 // count
IL_0023: blt.s IL_0013
// end of loop
// [127 7 - 127 27]
IL_0025: ldloc.2 // num
IL_0026: ret
} // end of method Benchmarking::ListForWithOptimization
.method public hidebysig static int32
ListForeach() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 2
.locals init (
[0] int32 num1,
[1] valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32> V_1,
[2] int32 num2
)
IL_0000: ldsfld class [mscorlib]System.Collections.Generic.List`1<int32> ConsoleApp2.Benchmarking::gList
IL_0005: ldc.i4.0
IL_0006: stloc.0 // num1
IL_0007: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<!0/*int32*/> class [mscorlib]System.Collections.Generic.List`1<int32>::GetEnumerator()
IL_000c: stloc.1 // V_1
.try
{
IL_000d: br.s IL_001b
// start of loop, entry point: IL_001b
// [135 16 - 135 24]
IL_000f: ldloca.s V_1
IL_0011: call instance !0/*int32*/ valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::get_Current()
IL_0016: stloc.2 // num2
// [136 9 - 136 21]
IL_0017: ldloc.0 // num1
IL_0018: ldloc.2 // num2
IL_0019: add
IL_001a: stloc.0 // num1
IL_001b: ldloca.s V_1
IL_001d: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::MoveNext()
IL_0022: brtrue.s IL_000f
// end of loop
IL_0024: leave.s IL_0034
} // end of .try
finally
{
IL_0026: ldloca.s V_1
IL_0028: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>
IL_002e: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0033: endfinally
} // end of finally
// [137 7 - 137 28]
IL_0034: ldloc.0 // num1
IL_0035: ret
} // end of method Benchmarking::ListForeach
.method public hidebysig static int32
ListForEach() cil managed
{
.custom instance void [BenchmarkDotNet.Core]BenchmarkDotNet.Attributes.BenchmarkAttribute::.ctor()
= (01 00 00 00 )
.maxstack 3
.locals init (
[0] class ConsoleApp2.Benchmarking/'<>c__DisplayClass13_0' cDisplayClass130
)
// [143 7 - 143 121]
IL_0000: newobj instance void ConsoleApp2.Benchmarking/'<>c__DisplayClass13_0'::.ctor()
IL_0005: stloc.0 // cDisplayClass130
IL_0006: ldsfld class [mscorlib]System.Collections.Generic.List`1<int32> ConsoleApp2.Benchmarking::gList
IL_000b: ldloc.0 // cDisplayClass130
IL_000c: ldc.i4.0
IL_000d: stfld int32 ConsoleApp2.Benchmarking/'<>c__DisplayClass13_0'::sum
IL_0012: ldloc.0 // cDisplayClass130
IL_0013: ldftn instance void ConsoleApp2.Benchmarking/'<>c__DisplayClass13_0'::'<ListForEach>b__0'(int32)
IL_0019: newobj instance void class [mscorlib]System.Action`1<int32>::.ctor(object, native int)
IL_001e: callvirt instance void class [mscorlib]System.Collections.Generic.List`1<int32>::ForEach(class [mscorlib]System.Action`1<!0/*int32*/>)
// [149 7 - 149 44]
IL_0023: ldloc.0 // cDisplayClass130
IL_0024: ldfld int32 ConsoleApp2.Benchmarking/'<>c__DisplayClass13_0'::sum
IL_0029: ret
} // end of method Benchmarking::ListForEach
.method public hidebysig specialname rtspecialname instance void
.ctor() cil managed
{
.maxstack 8
// [32 7 - 32 24]
IL_0000: ldarg.0 // this
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method Benchmarking::.ctor
} // end of class ConsoleApp2.Benchmarking
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true,
"optimize": true
},
"runtimes": {
"win7-x64": {}
},
"dependencies": {
"BenchmarkDotNet": "0.9.9",
"JetBrains.Annotations": "10.1.5",
"System.Numerics.Vectors": "4.1.0"
},
"frameworks": {
"net461": {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment