From deaa4e1c33cd2c1c75f698881918688055abfa51 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 7 Aug 2020 11:14:35 +0100 Subject: add quick2 --- sort/sort_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sort/sort_test.go') diff --git a/sort/sort_test.go b/sort/sort_test.go index a0e4729..3a44827 100644 --- a/sort/sort_test.go +++ b/sort/sort_test.go @@ -62,6 +62,12 @@ func TestQuickSort(t *testing.T) { } } +func TestQuick2Sort(t *testing.T) { + for i := 1; i <= maxLength; i *= 10 { + test(Quick2, i, t) + } +} + func TestShuffleSort(t *testing.T) { for i := 10; i <= maxLength; i *= 10 { testShuffle(Shuffle, i, t) @@ -110,6 +116,12 @@ func BenchmarkQuickSort(b *testing.B) { } } +func BenchmarkQuick2Sort(b *testing.B) { + for i := 1; i <= maxLength; i *= 10 { + benchmark(Quick2, i, b) + } +} + func BenchmarkShuffleSort(b *testing.B) { for i := 1; i <= maxLength; i *= 10 { benchmark(Shuffle, i, b) -- cgit v1.2.3