From cc521ad73f2b16df1a07f147da5eda48fefaab42 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Fri, 29 Nov 2024 22:27:05 +0100 Subject: [PATCH] Fix typos --- README.md | 4 ++-- bitset.go | 4 ++-- bitset_benchmark_test.go | 10 +++++----- popcnt_amd64_test.go | 2 +- popcnt_cmp_test.go | 2 +- popcnt_go18_test.go | 2 +- popcnt_test.go | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index f48d52a..c53bcf8 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This library is part of the [awesome go collection](https://github.com/avelino/a * [beego](https://github.com/beego/beego) * [CubeFS](https://github.com/cubefs/cubefs) * [Amazon EKS Distro](https://github.com/aws/eks-distro) -* [sourcegraph](https://github.com/sourcegraph/sourcegraph) +* [sourcegraph](https://github.com/sourcegraph/sourcegraph-public-snapshot) * [torrent](https://github.com/anacrolix/torrent) @@ -125,7 +125,7 @@ E.g., ## Memory Usage -The memory usage of a bitset using `N` bits is at least `N/8` bytes. The number of bits in a bitset is at least as large as one plus the greatest bit index you have accessed. Thus it is possible to run out of memory while using a bitset. If you have lots of bits, you might prefer compressed bitsets, like the [Roaring bitmaps](http://roaringbitmap.org) and its [Go implementation](https://github.com/RoaringBitmap/roaring). +The memory usage of a bitset using `N` bits is at least `N/8` bytes. The number of bits in a bitset is at least as large as one plus the greatest bit index you have accessed. Thus it is possible to run out of memory while using a bitset. If you have lots of bits, you might prefer compressed bitsets, like the [Roaring bitmaps](https://roaringbitmap.org) and its [Go implementation](https://github.com/RoaringBitmap/roaring). The `roaring` library allows you to go back and forth between compressed Roaring bitmaps and the conventional bitset instances: ```Go diff --git a/bitset.go b/bitset.go index 334367d..abfbd41 100644 --- a/bitset.go +++ b/bitset.go @@ -791,7 +791,7 @@ func (b *BitSet) Difference(compare *BitSet) (result *BitSet) { return } -// DifferenceCardinality computes the cardinality of the differnce +// DifferenceCardinality computes the cardinality of the difference func (b *BitSet) DifferenceCardinality(compare *BitSet) uint { panicIfNull(b) panicIfNull(compare) @@ -1277,7 +1277,7 @@ func (b *BitSet) UnmarshalJSON(data []byte) error { return err } -// Rank returns the nunber of set bits up to and including the index +// Rank returns the number of set bits up to and including the index // that are set in the bitset. // See https://en.wikipedia.org/wiki/Ranking#Ranking_in_statistics func (b *BitSet) Rank(index uint) uint { diff --git a/bitset_benchmark_test.go b/bitset_benchmark_test.go index 6942817..53267e1 100644 --- a/bitset_benchmark_test.go +++ b/bitset_benchmark_test.go @@ -189,7 +189,7 @@ func BenchmarkBitsetOps(b *testing.B) { } // go test -bench=LemireCreate -// see http://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ +// see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ func BenchmarkLemireCreate(b *testing.B) { for i := 0; i < b.N; i++ { bitmap := New(0) // we force dynamic memory allocation @@ -200,7 +200,7 @@ func BenchmarkLemireCreate(b *testing.B) { } // go test -bench=LemireCount -// see http://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ +// see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ func BenchmarkLemireCount(b *testing.B) { bitmap := New(100000000) for v := uint(0); v <= 100000000; v += 100 { @@ -217,7 +217,7 @@ func BenchmarkLemireCount(b *testing.B) { } // go test -bench=LemireIterate -// see http://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ +// see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ func BenchmarkLemireIterate(b *testing.B) { bitmap := New(100000000) for v := uint(0); v <= 100000000; v += 100 { @@ -236,7 +236,7 @@ func BenchmarkLemireIterate(b *testing.B) { } // go test -bench=LemireIterateb -// see http://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ +// see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ func BenchmarkLemireIterateb(b *testing.B) { bitmap := New(100000000) for v := uint(0); v <= 100000000; v += 100 { @@ -256,7 +256,7 @@ func BenchmarkLemireIterateb(b *testing.B) { } // go test -bench=BenchmarkLemireIterateManyb -// see http://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ +// see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/ func BenchmarkLemireIterateManyb(b *testing.B) { bitmap := New(100000000) for v := uint(0); v <= 100000000; v += 100 { diff --git a/popcnt_amd64_test.go b/popcnt_amd64_test.go index 8bcbf94..1bb05a7 100644 --- a/popcnt_amd64_test.go +++ b/popcnt_amd64_test.go @@ -1,7 +1,7 @@ //go:build !go1.9 && amd64 && !appengine // +build !go1.9,amd64,!appengine -// This file tests the popcnt funtions +// This file tests the popcnt functions package bitset diff --git a/popcnt_cmp_test.go b/popcnt_cmp_test.go index 363dc70..abbd400 100644 --- a/popcnt_cmp_test.go +++ b/popcnt_cmp_test.go @@ -1,7 +1,7 @@ //go:build !go1.9 && amd64 && !appengine // +build !go1.9,amd64,!appengine -// This file tests the popcnt funtions +// This file tests the popcnt functions package bitset diff --git a/popcnt_go18_test.go b/popcnt_go18_test.go index df6921c..03b3574 100644 --- a/popcnt_go18_test.go +++ b/popcnt_go18_test.go @@ -1,4 +1,4 @@ -// This file tests the popcnt funtions +// This file tests the popcnt functions package bitset diff --git a/popcnt_test.go b/popcnt_test.go index d9fbb34..ac62bc7 100644 --- a/popcnt_test.go +++ b/popcnt_test.go @@ -1,4 +1,4 @@ -// This file tests the popcnt funtions +// This file tests the popcnt functions package bitset