Go to file
Håvard Anda Estensen 9d5f02ce76
Use hex package to convert bytes to string (#761)
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
```
2022-12-04 16:17:37 +07:00
.github/workflows Downloader extract, step2 (#739) 2022-11-20 10:41:20 +07:00
aggregator Fieldalign (#695) 2022-10-21 15:31:23 +07:00
bptree Fieldalign (#695) 2022-10-21 15:31:23 +07:00
chain Fieldalign (#695) 2022-10-21 15:31:23 +07:00
commitment [WIP] E4 commitment keys replace (#684) 2022-11-21 07:39:30 +00:00
common log experiment enabling (#759) 2022-12-03 12:56:12 +07:00
compress tests speedup (#751) 2022-12-01 14:45:03 +07:00
crypto Remove TxParseContext.withBor (#622) 2022-09-04 13:15:02 +02:00
direct Add withdrawal operations to Engine API (#734) 2022-12-01 08:32:55 +01:00
downloader hotfix(downloader): detect ipv6 only on linux #6117 (#745) 2022-11-24 20:43:41 +07:00
etl Use hex package to convert bytes to string (#761) 2022-12-04 16:17:37 +07:00
gointerfaces Add withdrawal operations to Engine API (#734) 2022-12-01 08:32:55 +01:00
kv log experiment enabling (#759) 2022-12-03 12:56:12 +07:00
mmap Madv helpers (#667) 2022-10-04 10:51:51 +01:00
patricia fix linter warnings (#698) 2022-10-22 13:19:27 +07:00
pedersen_hash Enable unconvert linter (#609) 2022-08-30 09:50:23 +07:00
recsplit tests speedup (#751) 2022-12-01 14:45:03 +07:00
rlp Fieldalign (#695) 2022-10-21 15:31:23 +07:00
sais Avoid redefinitions in gsacak.h (#602) 2022-08-24 15:29:17 +02:00
state e3: optimize incremental hashstate (#756) 2022-12-03 12:22:38 +07:00
txpool Use hex package to convert bytes to string (#761) 2022-12-04 16:17:37 +07:00
types fix linter warnings (#698) 2022-10-22 13:19:27 +07:00
.gitignore Reverted 3 last commits (#348) 2022-02-24 14:39:42 +00:00
.golangci.yml Remove deprectated linter structcheck (#715) 2022-10-31 11:40:04 +07:00
go.mod mdbx: reproducibility of benchmarks (#757) 2022-12-02 18:42:35 +07:00
go.sum mdbx: reproducibility of benchmarks (#757) 2022-12-02 18:42:35 +07:00
LICENSE Initial commit 2021-06-19 10:43:10 +01:00
Makefile Added execution .proto (#749) 2022-11-30 11:20:21 +01:00
README.md Initial commit 2021-06-19 10:43:10 +01:00
rules.go linter: add rules.go from erigon #418 Open 2022-04-17 09:12:09 +07:00
tools.go Added execution .proto (#749) 2022-11-30 11:20:21 +01:00

erigon-lib

Dependencies of Erigon project, rewritten from scratch and licensed under Apache 2.0