Skip to content

Instantly share code, notes, and snippets.

using BenchmarkDotNet.Attributes;
using System;
namespace ConsoleApplication2
{
[Config("jobs=RyuJitX64")]
public class IndexOf
{
// Not found
[Params(1, 12, 50, 100, 200, 500)]
@bbowyersmyth
bbowyersmyth / Replace.cs
Created March 1, 2016 06:32
ReplaceChar
using BenchmarkDotNet;
using BenchmarkDotNet.Attributes;
using System;
namespace ConsoleApplication2
{
[Config("jobs=RyuJitX64")]
public class Replace
{
@bbowyersmyth
bbowyersmyth / StartsWithAlignedUnaligned.cs
Last active January 25, 2016 22:38
StartsWithAlignedUnaligned
using BenchmarkDotNet;
using BenchmarkDotNet.Tasks;
using System;
using System.Globalization;
using System.Runtime.CompilerServices;
namespace ConsoleApplication2
{
[BenchmarkTask(platform: BenchmarkPlatform.X64, jitVersion: BenchmarkJitVersion.RyuJit)]
public class StringCompare
using System.Diagnostics;
using Xunit.Abstractions;
[assembly: CollectionBehavior(DisableTestParallelization = true)]
// Remove "static" from "public static unsafe class StringTests"
[Fact]
public void TestStartsWithPerfMatch1Char()
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
namespace ConsoleApplication2
{