From 9519e8f7fcabaee2129e77a09a4b4eee075c5663 Mon Sep 17 00:00:00 2001 From: Diptanshu Kakwani Date: Tue, 3 Dec 2024 17:14:57 +0530 Subject: [PATCH] fix random ordered list --- src/Paprika.Benchmarks/SlottedArrayBenchmarks.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Paprika.Benchmarks/SlottedArrayBenchmarks.cs b/src/Paprika.Benchmarks/SlottedArrayBenchmarks.cs index 28473050..a85f3736 100644 --- a/src/Paprika.Benchmarks/SlottedArrayBenchmarks.cs +++ b/src/Paprika.Benchmarks/SlottedArrayBenchmarks.cs @@ -121,7 +121,8 @@ public SlottedArrayBenchmarks() // Randomly shuffle the indices. var rand = new Random(13); - rand.Shuffle(randomKeysIndexSpan); + var randomKeysSlice = randomKeysIndexSpan.Slice(0, KeyCount - 1); + rand.Shuffle(randomKeysSlice); } [Benchmark(OperationsPerInvoke = 4)]