cosmos-sdk/x/params/types
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
..
proposal refactor: Implementing sigs.k8s.io YAML to remove .proto yaml annotations (#9780) 2021-09-24 14:37:34 +00:00
common_test.go Merge PR #5649: Update x/params to follow module standards 2020-02-19 12:52:20 +01:00
consensus_params.go feat: add version params to parameters (#9432) 2021-07-08 08:46:45 +00:00
deref_test.go x/params/types: make KeyTable.RegisterType fully dereference pointers (#6915) 2020-08-02 20:18:28 +00:00
doc.go Merge PR #5649: Update x/params to follow module standards 2020-02-19 12:52:20 +01:00
keys.go Merge PR #6005: x/params: Raw Parameter Querying 2020-04-16 12:22:58 -04:00
paramset.go Merge PR #5649: Update x/params to follow module standards 2020-02-19 12:52:20 +01:00
querier.go Merge PR #6005: x/params: Raw Parameter Querying 2020-04-16 12:22:58 -04:00
subspace.go perf: avoid unnecessary byteslice->string before fmt %s verb (#10364) 2021-10-14 08:53:38 +00:00
subspace_test.go refactor: Remove store type aliases (#10295) 2021-10-04 16:36:38 +00:00
table.go x/params/types: make KeyTable.RegisterType fully dereference pointers (#6915) 2020-08-02 20:18:28 +00:00
table_test.go Exclude proto files from format (#5706) 2020-02-27 07:53:22 -03:00