mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
9d5f02ce76
From my [benchmarks](https://github.com/estensen/benchmarks/blob/master/encoding/encoding.go) it's a lot faster. Especially for few bytes. ``` cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_1_byte-12 12689306 89.64 ns/op 26 B/op 2 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_1_byte-12 80529291 14.74 ns/op 2 B/op 1 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_5_bytes-12 10836607 108.2 ns/op 40 B/op 2 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_5_bytes-12 42891154 28.82 ns/op 16 B/op 1 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_10_bytes-12 9706875 119.8 ns/op 48 B/op 2 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_10_bytes-12 31689613 33.88 ns/op 24 B/op 1 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_50_bytes-12 5202006 210.4 ns/op 136 B/op 2 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_50_bytes-12 10616301 109.5 ns/op 224 B/op 2 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_100_bytes-12 5614594 210.9 ns/op 136 B/op 2 allocs/op BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_100_bytes-12 10426776 108.6 ns/op 224 B/op 2 allocs/op ``` |
||
---|---|---|
.github/workflows | ||
aggregator | ||
bptree | ||
chain | ||
commitment | ||
common | ||
compress | ||
crypto | ||
direct | ||
downloader | ||
etl | ||
gointerfaces | ||
kv | ||
mmap | ||
patricia | ||
pedersen_hash | ||
recsplit | ||
rlp | ||
sais | ||
state | ||
txpool | ||
types | ||
.gitignore | ||
.golangci.yml | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md | ||
rules.go | ||
tools.go |
erigon-lib
Dependencies of Erigon project, rewritten from scratch and licensed under Apache 2.0