diff --git a/collection.go b/collection.go index 2c0dbb8..41fab96 100644 --- a/collection.go +++ b/collection.go @@ -105,7 +105,7 @@ func (c *Collection) findFreeIndex(count uint64) uint32 { } // Otherwise, we scan the fill bitmap until we find the first zero. - idx, _ := c.fill.FirstZero() + idx, _ := c.fill.MinZero() return idx } diff --git a/collection_test.go b/collection_test.go index f426b33..bcd0eed 100644 --- a/collection_test.go +++ b/collection_test.go @@ -23,7 +23,7 @@ import ( cpu: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz BenchmarkCollection/insert-8 5531546 215.9 ns/op 18 B/op 0 allocs/op BenchmarkCollection/fetch-8 23749724 44.97 ns/op 0 B/op 0 allocs/op -BenchmarkCollection/scan-8 784 1527506 ns/op 160 B/op 0 allocs/op +BenchmarkCollection/scan-8 855 1388532 ns/op 88 B/op 0 allocs/op BenchmarkCollection/count-8 1000000 1081 ns/op 0 B/op 0 allocs/op BenchmarkCollection/range-8 10000 100833 ns/op 14 B/op 0 allocs/op BenchmarkCollection/update-at-8 4225484 281.7 ns/op 0 B/op 0 allocs/op diff --git a/go.mod b/go.mod index 1c90b01..d89293d 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,6 @@ go 1.16 require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/kelindar/bitmap v1.0.9 + github.com/kelindar/bitmap v1.0.12 github.com/stretchr/testify v1.7.0 ) diff --git a/go.sum b/go.sum index 387a3c7..33ff660 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/kelindar/bitmap v1.0.9 h1:jVaK6cdq9uvjK0ZsZT6oLRCfad1KnZLRcAWk99b4Z6Q= -github.com/kelindar/bitmap v1.0.9/go.mod h1:shAFyS8BOif+pvJ05GqxnCM0SdohHQjKvDetqI/9z6M= +github.com/kelindar/bitmap v1.0.12 h1:MD696wPzddmfP/XrSm+kApsfVNJ5muR/2Sb2VAf+8QE= +github.com/kelindar/bitmap v1.0.12/go.mod h1:shAFyS8BOif+pvJ05GqxnCM0SdohHQjKvDetqI/9z6M= github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=