Skip to content

Instantly share code, notes, and snippets.

View benaadams's full-sized avatar
🦆
rubber duck debugging

Ben Adams benaadams

🦆
rubber duck debugging
View GitHub Profile
using System;
using System.Numerics;
using System.Runtime.Intrinsics.X86;
using static System.Console;
class Program
{
static void Main()
{
FillBuckets(bucketCount: 17, values: ..17);
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
namespace delegate_interface
{
public class Program : IFoo
{
const int InnerLoopCount = 10000;
@benaadams
benaadams / ValueLinqBenchmarks.cs
Created June 14, 2018 07:20
Value Linq Benchmarks
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Running;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System;
using System.Buffers;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
public class Program
{
public static void Main(string[] args)
=> BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
@benaadams
benaadams / Enviorment
Last active December 9, 2018 04:08
PipeThroughputBenchmark
SET COMPlus_TieredCompilation=0
@benaadams
benaadams / IListPerformance.cs
Last active December 5, 2018 22:12 — forked from Thealexbarney/IListPerformance.cs
Simple IList performance benchmark
using System;
using System.Collections.Generic;
using System.Collections;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace IListPerformance
{
public class Program
{
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
namespace hash
{
public class Program
{
const int Iterations = 10;
This file has been truncated, but you can view the full file.
****** START compiling <Task1>d__1:MoveNext():this (MethodHash=39840edc)
Generating code for Windows x64
OPTIONS: compCodeOpt = BLENDED_CODE
OPTIONS: compDbgCode = false
OPTIONS: compDbgInfo = true
OPTIONS: compDbgEnC = false
OPTIONS: compProcedureSplitting = false
OPTIONS: compProcedureSplittingEH = false
OPTIONS: Stack probing is DISABLED
IL to import:
This file has been truncated, but you can view the full file.
****** START compiling <ValueTask1>d__1:MoveNext():this (MethodHash=87def557)
Generating code for Windows x64
OPTIONS: compCodeOpt = BLENDED_CODE
OPTIONS: compDbgCode = false
OPTIONS: compDbgInfo = true
OPTIONS: compDbgEnC = false
OPTIONS: compProcedureSplitting = false
OPTIONS: compProcedureSplittingEH = false
OPTIONS: Stack probing is DISABLED
IL to import:
****** START compiling Program:ViaStruct5() (MethodHash=900a8869)
Generating code for Windows x64
OPTIONS: compCodeOpt = BLENDED_CODE
OPTIONS: compDbgCode = false
OPTIONS: compDbgInfo = true
OPTIONS: compDbgEnC = false
OPTIONS: compProcedureSplitting = false
OPTIONS: compProcedureSplittingEH = false
OPTIONS: Stack probing is DISABLED
IL to import: