diff options
Diffstat (limited to 'sixel_test.go')
| -rw-r--r-- | sixel_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sixel_test.go b/sixel_test.go new file mode 100644 index 0000000..eb7f989 --- /dev/null +++ b/sixel_test.go @@ -0,0 +1,23 @@ +package sixel + +import ( + "cmp" + "math/rand/v2" + "testing" +) + +func BenchmarkQuickSelect(b *testing.B) { + r := rand.New(rand.NewPCG(0, 0)) + testSlice := make([]int, 3840*2160) + for i := range testSlice { + testSlice[i] = r.Int() + } + myTestSlice := make([]int, len(testSlice)) + for b.Loop() { + b.StopTimer() + copy(myTestSlice, testSlice) + b.StartTimer() + var randState uint64 + quickSelect(myTestSlice, len(myTestSlice)/2, cmp.Compare, &randState) + } +} |
