This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DisassemblyDiagnoser(maxDepth:2, printSource:true)] | |
public class Bench5 | |
{ | |
public int[] a = new int[1024]; | |
public int size = 1024; | |
[GlobalSetup] | |
public void Setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BenchSum | |
{ | |
private int[] _values; | |
[GlobalSetup] | |
public void Setup() | |
{ | |
_values = new int[1024]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Bench6 | |
{ | |
int div = 10; | |
int by = 4; | |
[Benchmark(Baseline = true)] | |
public int Div() | |
{ | |
var a = div; | |
var b = by; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Bench | |
{ | |
int mul = 10; | |
int by = 4; | |
[Benchmark(Baseline = true)] | |
public int Mul() | |
{ | |
var a = mul; | |
var b = by; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DoesCounterMatterBenchmark | |
{ | |
private List<int> _list; | |
public DoesCounterMatterBenchmark() | |
{ | |
} | |
[GlobalSetup] | |
public void Setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PowerUp.Core; | |
using PowerUp.Core.Console; | |
using System; | |
using System.Numerics; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
using BenchmarkDotNet; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Orderer(SummaryOrderPolicy.SlowestToFastest, MethodOrderPolicy.Declared)] | |
public class DivBench | |
{ | |
[Benchmark(Baseline = true)] | |
[Arguments(100, 10)] | |
[Arguments(1000, 16)] | |
public ulong Div(ulong a, ulong b) | |
{ | |
return a / b; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Media; | |
using System.Windows.Media.Animation; | |
namespace WPFAnimations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace ProbabilisticDataStructures.DataStructures | |
{ | |
public class BitSet | |
{ | |
private ulong[] bitset; | |
public int Size { get; private set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BitSet | |
{ | |
private ulong[] bitset; | |
public int Size { get; private set; } | |
public BitSet(int size) | |
{ | |
bitset = new ulong[(size / 64) + 1]; | |
Size = size; | |
} |