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> |
||
---|---|---|
.. | ||
block | ||
blockchainer | ||
chaindump | ||
dao | ||
fee | ||
interop | ||
mempool | ||
mempoolevent | ||
mpt | ||
native | ||
state | ||
stateroot | ||
storage | ||
test_data | ||
transaction | ||
blockchain.go | ||
blockchain_test.go | ||
doc.go | ||
helper_test.go | ||
interop_system.go | ||
interop_system_test.go | ||
interops.go | ||
interops_test.go | ||
native_contract_test.go | ||
native_designate_test.go | ||
native_gas_test.go | ||
native_ledger_test.go | ||
native_management_test.go | ||
native_neo_test.go | ||
native_notary_test.go | ||
native_oracle_test.go | ||
native_policy_test.go | ||
nonnative_name_service_test.go | ||
notary_test.go | ||
oracle_test.go | ||
prometheus.go | ||
stateroot_test.go | ||
util.go | ||
util_test.go |