static void Main(string[] args) { var competitionSwitch = new BenchmarkCompetitionSwitch(new[] { typeof(Intro_00_Basic), typeof(Intro_01_MethodTasks), typeof(Intro_02_ClassTasks), typeof(Intro_03_SingleRun), typeof(Intro_04_UniformReportingTest), typeof(Il_ReadonlyFields), typeof(Il_Switch), typeof(Jit_LoopUnrolling), typeof(Jit_ArraySumLoopUnrolling), typeof(Jit_Inlining), typeof(Jit_BoolToInt), typeof(Jit_Bce), typeof(Jit_InterfaceMethod), typeof(Cpu_Ilp_Inc), typeof(Cpu_Ilp_Max), typeof(Cpu_Ilp_VsBce), typeof(Cpu_Ilp_RyuJit), typeof(Cpu_MatrixMultiplication), typeof(Cpu_BranchPerdictor), typeof(Framework_SelectVsConvertAll), typeof(Framework_StackFrameVsStackTrace), typeof(Math_DoubleSqrt), typeof(Math_DoubleSqrtAvx), typeof(Algo_BitCount), typeof(Algo_MostSignificantBit), typeof(Algo_Md5VsSha256) }); competitionSwitch.Run(args); }
public static void Main(string[] args) { var competitionSwitch = new BenchmarkCompetitionSwitch(new[] { typeof(Competition) }); competitionSwitch.Run(new[] { "Competition" }); }
public static void Main(string[] args) { var competitionSwitch = new BenchmarkCompetitionSwitch(new[] { typeof(MemoryCompareBenchmark), typeof(MemoryCopyBenchmark), typeof(HashingBenchmark) }); competitionSwitch.Run(args); }
static void Main(string[] args) { var competitionSwitch = new BenchmarkCompetitionSwitch(new [] { typeof(Util_AtomicCounters), typeof(Sdk_ActionBenchmarkInvoker), typeof(Sdk_ReflectionBenchmarkInvoker), typeof(Sdk_ReflectionBenchmarkInvokerWithRealWork) }); competitionSwitch.Run(args);; }
static void Main(string[] args) { var competitionSwitch = new BenchmarkCompetitionSwitch(new[] { // Introduction typeof(Intro_00_Basic), typeof(Intro_01_MethodTasks), typeof(Intro_02_ClassTasks), typeof(Intro_03_SingleRun), typeof(Intro_04_UniformReportingTest), // IL typeof(Il_ReadonlyFields), typeof(Il_Switch), // JIT typeof(Jit_LoopUnrolling), typeof(Jit_ArraySumLoopUnrolling), typeof(Jit_Inlining), typeof(Jit_BoolToInt), typeof(Jit_Bce), typeof(Jit_InterfaceMethod), typeof(Jit_RegistersVsStack), typeof(Jit_AsVsCast), // CPU typeof(Cpu_Atomics), typeof(Cpu_Ilp_Inc), typeof(Cpu_Ilp_Max), typeof(Cpu_Ilp_VsBce), typeof(Cpu_Ilp_RyuJit), typeof(Cpu_MatrixMultiplication), typeof(Cpu_BranchPerdictor), // Framework typeof(Framework_SelectVsConvertAll), typeof(Framework_StackFrameVsStackTrace), typeof(Framework_StopwatchVsDateTime), // Algorithms typeof(Algo_BitCount), typeof(Algo_MostSignificantBit), typeof(Algo_Md5VsSha256), // Other typeof(Math_DoubleSqrt), typeof(Math_DoubleSqrtAvx), typeof(Array_HeapAllocVsStackAlloc), // Infra typeof(Infra_Params) }); competitionSwitch.Run(args); }
static void Main(string[] args) { var competitions = new BenchmarkCompetitionSwitch(new[] { typeof(PropertyGetterReflectionBenchmark), typeof(PropertySetterReflectionBenchmark), typeof(DynamicProxyCallBenchmark), typeof(DynamicProxyCreationBenchmark) }); competitions.Run(args); // new BenchmarkRunner().RunCompetition(new PropertyGetterReflectionBenchmark()); // new DynamicProxyCreationBenchmark().NProxyCreation(); Console.ReadKey(); }
static void Main(string[] args) { if (args.Length > 0 && args[0] == "ProfilerAttached") { var parsePerf = new ParsePerf(); for (int i = 0; i < 100000; i++) { parsePerf.ParseOneValue(); parsePerf.ParseTwoValues(); } return; } var benchmarks = Assembly.GetExecutingAssembly().GetTypes() .Where(t => t.GetMethods(BindingFlags.Instance | BindingFlags.Public) .Any(m => m.GetCustomAttributes(typeof(BenchmarkAttribute), false).Any())) .OrderBy(t => t.Namespace) .ThenBy(t => t.Name) .ToArray(); var compSwitch = new BenchmarkCompetitionSwitch(benchmarks); compSwitch.Run(args); }
public static void Main(string[] args) { var competitionSwitch = new BenchmarkCompetitionSwitch(new[] { typeof(ArrayWhereIteratorBenchmarks), typeof(ListWhereIteratorBenchmarks), typeof(ReadOnlyCollectionWhereIteratorBenchmark), typeof(ArrayWhereSelectIteratorBenchmarks), typeof(ListWhereIteratorBenchmarks), typeof(ReadOnlyCollectionWhereSelectIteratorBenchmark), typeof(RangeSelectIteratorBenchmarks), typeof(ArraySelectWhereIteratorBenchmarks), typeof(ArrayProviderBenchmarks), typeof(MathExtensionsBenchmarks), typeof(ReferencingToFieldVsReferencingToLocalVariableAndReadOnlyVsMutable), typeof(BoundariesCheckEliminationBenchmarks), typeof(ExtractedArrayMathExtensionsBenchmarks), typeof(ManualLoopUnrollingBenchmarks), typeof(FastestMin), typeof(ForLoopVsWhileBenchmarks), typeof(WhereLastBenchmark), typeof(SortingExtensionsBenchmarks), typeof(ValueTypesSortingBenchmarks), typeof(SendingHugeValueTypesAsParametersBenchmarks), typeof(ReferenceTypesSortingBenchmarks), typeof(ArraySortersBenchmarks), typeof(SwappingRefVsMultipleArrayAccessBenchmarks), typeof(SystemArraySort), typeof(OptimizedSystemArraySort), typeof(SystemArraySortUsingCustomComparer), typeof(DynamicArraySorterBenchmarks), typeof(CallingComparersOnValueTypesBenchmarks) }); competitionSwitch.Run(args); }