crunch alternatives and similar packages
Based on the "Data Structures" category.
Alternatively, view crunch alternatives based on common mentions on social networks and blogs.
-
gods
Go Data Structures. Containers, Sets, Lists, Stacks, Maps, BidiMaps, Trees, HashSet etc. -
go-datastructures
a collection of useful, performant, and thread-safe data structures -
golang-set
Thread-Safe and Non-Thread-Safe high-performance sets for Go. -
gota
An implementation of dataframes, series, and data wrangling methods for Go. -
boomfilters
probabilistic data structures for processing continuous, unbounded streams -
gocache
A complete Go cache library with mutiple stores (memory, memcache, redis, ...), chainable, loadable, metrics cache and more. -
cuckoofilter
Cuckoo filter: a good alternative to a counting bloom filter implemented in Go. -
hyperloglog
HyperLogLog implementation with Sparse, LogLog-Beta bias correction and TailCut space reduction. -
Bloomfilter
Face-meltingly fast, thread-safe, marshalable, unionable, probability- and optimal-size-calculating Bloom filter in go -
gostl
Data structure and algorithm library for go, designed to provide functions similar to C++ STL. -
merkletree
Implementation of a merkle tree providing an efficient and secure verification of the contents of data structures. -
hilbert
Go package for mapping values to and from space-filling curves, such as Hilbert and Peano curves. -
ttlcache
An in-memory LRU string-interface{} map with expiration for golang -
go-adaptive-radix-tree
A Go implementation of Adaptive Radix Tree. -
binpacker
Binary packer and unpacker helps user build custom binary stream. -
cuckoo-filter
Cuckoo filter: a comprehensive cuckoo filter, which is configurable and space optimized compared with other implements, and all features mentioned in original paper is available. -
go-rquad
Region quadtrees with efficient point location and neighbour finding. -
remember-go
A universal interface for caching slow database queries (backed by redis, memcached, ristretto, or in-memory). -
count-min-log
A Go implementation Count-Min-Log sketch: Approximately counting with approximate counters (Like Count-Min sketch but using less memory). -
nan
Zero allocation Nullable structures in one library with handy conversion functions, marshallers and unmarshallers. -
hide
ID type with marshalling to/from hash to prevent sending IDs to clients.
Scout APM - Leading-edge performance monitoring starting at $39/month
Do you think we are missing an alternative of crunch or a related project?
Popular Comparisons
README
crunch
a library for easily manipulating bits and bytes in golang
features | installation | benchmarks | examples
features
- feature-rich: supports reading and writing integers of varying sizes in both little and big endian
- performant: performs more than twice as fast as the standard library's
bytes.Buffer
- simple and familiar: has a consistent and easy-to-use api
- licensed under the mpl-2.0: use it anywhere you wish, just don't change it privately
installation
install with the go
tool
$ go get github.com/superwhiskers/crunch/v3
then, just import it in your project like this. easy!
package "yourpackage"
import crunch "github.com/superwhiskers/crunch/v3"
install using git submodules (not recommended)
# this assumes that you are in a git repository
$ git submodule add https://github.com/superwhiskers/crunch path/to/where/you/want/crunch
then, you can import it like this
package "yourpackage"
import crunch "github.com/your-username/project/path/to/crunch/v3"
benchmarks
both Buffer
and MiniBuffer
perform on average more than twice as fast as bytes.Buffer
in both writing and reading
BenchmarkBufferWriteBytes-4 2000000000 1.45 ns/op 0 B/op 0 allocs/op
BenchmarkBufferReadBytes-4 2000000000 0.84 ns/op 0 B/op 0 allocs/op
BenchmarkBufferWriteU32LE-4 200000000 9.28 ns/op 0 B/op 0 allocs/op
BenchmarkBufferReadU32LE-4 50000000 26.6 ns/op 8 B/op 1 allocs/op
BenchmarkBufferReadBit-4 2000000000 0.84 ns/op 0 B/op 0 allocs/op
BenchmarkBufferReadBits-4 1000000000 2.25 ns/op 0 B/op 0 allocs/op
BenchmarkBufferSetBit-4 1000000000 2.07 ns/op 0 B/op 0 allocs/op
BenchmarkBufferClearBit-4 1000000000 2.05 ns/op 0 B/op 0 allocs/op
BenchmarkMiniBufferWriteBytes-4 2000000000 1.42 ns/op 0 B/op 0 allocs/op
BenchmarkMiniBufferReadBytes-4 2000000000 0.58 ns/op 0 B/op 0 allocs/op
BenchmarkMiniBufferWriteU32LE-4 200000000 8.79 ns/op 0 B/op 0 allocs/op
BenchmarkMiniBufferReadU32LE-4 500000000 3.91 ns/op 0 B/op 0 allocs/op
BenchmarkMiniBufferReadBit-4 2000000000 0.64 ns/op 0 B/op 0 allocs/op
BenchmarkMiniBufferReadBits-4 300000000 5.64 ns/op 0 B/op 0 allocs/op
BenchmarkMiniBufferSetBit-4 1000000000 2.03 ns/op 0 B/op 0 allocs/op
BenchmarkMiniBufferClearBit-4 1000000000 2.10 ns/op 0 B/op 0 allocs/op
BenchmarkStdByteBufferWrite-4 200000000 9.42 ns/op 0 B/op 0 allocs/op
BenchmarkStdByteBufferRead-4 500000000 3.36 ns/op 0 B/op 0 allocs/op
examples
examples can be found in the examples directory
acknowledgements
icon (cookie logo) made by freepik from flaticon.com
*Note that all licence references and agreements mentioned in the crunch README section above
are relevant to that project's source code only.