cosmos-sdk/x/genutil
Emmanuel T Odeke d0f64dff2c
perf: avoid unnecessary byteslice->string before fmt %s verb (#10364)
fmt.Printf or fmt.Sprintf already know how to convert a
byteslice into a string when building the output; we shouldn't
incur the unnecessary string(byteslice) conversion.
Using Bencher, we can see improvements such as
https://dashboard.github.orijtech.com/benchmark/3245b8e4bbbd44a597480319aaa4b9fe
which in independent experiments show:

* time/op (ns/op)
FormatIt-8	1.2µs ± 2%	1.1µs ± 10%	-11.77%	(p=0.000 n=10+9)

* speed (MB/s)
FormatIt-8	0.71GB/s ± 2%	0.80GB/s ± 9%	+13.59%	(p=0.000 n=10+9)

* allocs/op (B/op)
FormatIt-8	2.0kB ± 0%	1.1kB ± 0%	-45.62%	(p=0.000 n=10+10)

* allocs/op (count/op)
FormatIt-8	11 ± 0%	        9.0 ± 0%	-18.18%	(p=0.000 n=10+10)

Fixes #10363
2021-10-14 08:53:38 +00:00
..
client perf: avoid unnecessary byteslice->string before fmt %s verb (#10364) 2021-10-14 08:53:38 +00:00
migrations feat: add migrations for balances with zero coins (#9664) 2021-07-13 09:22:17 +00:00
types refactor: Implementing sigs.k8s.io YAML to remove .proto yaml annotations (#9780) 2021-09-24 14:37:34 +00:00
collect.go refactor: move from io/ioutil to io and os package (#10341) 2021-10-13 07:38:22 +00:00
collect_test.go refactor: move from io/ioutil to io and os package (#10341) 2021-10-13 07:38:22 +00:00
doc.go Merge PR #4159: Module/Genesis Generalization 2019-05-16 11:25:32 -04:00
genesis.go Use any as validator pubkey (#7597) 2020-10-23 12:07:52 +00:00
gentx.go codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00
gentx_test.go feat!: Ensure InitGenesis returns with non-empty validator set (#9697) 2021-10-05 12:02:51 +00:00
module.go feat!: remove legacy REST (#9594) 2021-07-06 10:04:54 +00:00
utils.go fix: Added missing validator key save when recovering from mnemonic (#9638) 2021-07-06 13:52:23 +00:00
utils_test.go refactor!: Keyring migration (#9695) 2021-09-20 12:02:15 +00:00