mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
291a29af1e
`WriteArray` involves reflection, it makes sense to optimize serialization of transactions and application logs which are serialized constantly. Adding case in a type switch in `WriteArray` is not an option because we don't want new dependencies for `io` package. ``` name old time/op new time/op delta AppExecResult_EncodeBinary-8 852ns ± 3% 656ns ± 2% -22.94% (p=0.000 n=10+9) name old alloc/op new alloc/op delta AppExecResult_EncodeBinary-8 448B ± 0% 376B ± 0% -16.07% (p=0.000 n=10+10) name old allocs/op new allocs/op delta AppExecResult_EncodeBinary-8 7.00 ± 0% 5.00 ± 0% -28.57% (p=0.000 n=10+10) ``` ``` name old time/op new time/op delta Transaction_Bytes-8 1.29µs ± 3% 0.76µs ± 5% -41.52% (p=0.000 n=9+10) name old alloc/op new alloc/op delta Transaction_Bytes-8 1.21kB ± 0% 1.01kB ± 0% -16.56% (p=0.000 n=10+10) name old allocs/op new allocs/op delta Transaction_Bytes-8 12.0 ± 0% 7.0 ± 0% -41.67% (p=0.000 n=10+10) ``` Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru> |
||
---|---|---|
.. | ||
attribute.go | ||
attribute_test.go | ||
attrtype.go | ||
attrtype_string.go | ||
bench_test.go | ||
conflicts.go | ||
doc.go | ||
helper_test.go | ||
not_valid_before.go | ||
notary_assisted.go | ||
oracle.go | ||
oracle_test.go | ||
oracleresponsecode_string.go | ||
reserved.go | ||
signer.go | ||
signer_test.go | ||
transaction.go | ||
transaction_test.go | ||
witness.go | ||
witness_scope.go | ||
witness_scope_string.go | ||
witness_scope_test.go | ||
witness_test.go |