Skip to content

Commit

Permalink
benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyPatten committed Sep 19, 2020
1 parent d722286 commit 4e4b71c
Show file tree
Hide file tree
Showing 3 changed files with 294 additions and 176 deletions.
5 changes: 5 additions & 0 deletions Tools/Towel_Benchmarking/Permute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ [IterationSetup] public void IterationSetup()

[Benchmark] public void Recursive() => PermuteRecursive<int>(array, () => { });
[Benchmark] public void Iterative() => PermuteIterative<int>(array, () => { });

[Benchmark] public void RecursiveStruct() => PermuteRecursive<int, NoOp>(array);
[Benchmark] public void IterativeStruct() => PermuteIterative<int, NoOp>(array);

struct NoOp : IAction { public void Do() { } }
}
}
6 changes: 3 additions & 3 deletions Tools/Towel_Benchmarking/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public static void Main(string[] args)
typeof(Random_Benchmarks),
typeof(ToEnglishWords_Benchmarks),
typeof(Permute_Benchmarks),
//typeof(MapVsDictionary_Add),
//typeof(MapVsDictionary_LookUp),
//typeof(SpanVsArraySorting),
typeof(MapVsDictionary_Add),
typeof(MapVsDictionary_LookUp),
typeof(SpanVsArraySorting),
};

/// <summary>Runs the benchmarks.</summary>
Expand Down
Loading

0 comments on commit 4e4b71c

Please sign in to comment.