From 3f0c9925f4aa88a2b9e893c9027594f14267008e Mon Sep 17 00:00:00 2001 From: Seebs Date: Fri, 5 Jun 2020 13:09:33 -0500 Subject: [PATCH] Don't test quite so many values for BtreeSeek and BtreeDelete BtreeSeek is O(N^2) on its N, and there's not a ton of extra utility to testing a larger range of values, so we reduce N by a bit, cutting runtime from ~10s to <1s on my laptop. Also reduce the scale of the BtreeDelete1/BtreeDelete2 tests a bit because, again, lots of runtime for little marginal information. --- roaring/btree_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roaring/btree_test.go b/roaring/btree_test.go index c3c02af3d..f0f528a7b 100644 --- a/roaring/btree_test.go +++ b/roaring/btree_test.go @@ -689,7 +689,7 @@ func TestBtreeDelete0(t *testing.T) { } func TestBtreeDelete1(t *testing.T) { - const N = 130000 + const N = 13000 for _, x := range []int{0, -1, 0x555555, 0xaaaaaa, 0x333333, 0xcccccc, 0x314159} { r := treeNew() set := r.Set @@ -788,7 +788,7 @@ func benchmarkDelRnd(b *testing.B, n int) { } func TestBtreeDelete2(t *testing.T) { - const N = 100000 + const N = 10000 for _, x := range []int{0, -1, 0x555555, 0xaaaaaa, 0x333333, 0xcccccc, 0x314159} { r := treeNew() set := r.Set @@ -1468,7 +1468,7 @@ func TestBtreePut(t *testing.T) { } func TestBtreeSeek(t *testing.T) { - const N = 1 << 13 + const N = 1 << 11 tr := treeNew() for i := 0; i < N; i++ { k := 2*i + 1