laconicd/x/evm
Emmanuel T Odeke a2f246c2a6
x/evm/keeper: use the fastest slice making idiom for Keeper.EthereumTx.Logs (#827)
Uses the fastest slice making idiom of creating the well known
size of a slice using

    make([]sdk.Attribute, len(response.Logs))
    for i, log := range response.Logs {
        txLogAttrs[i] = ...
    }

instead of

    make([]sdk.Attribute, 0)
    for _, log := range response.Logs {
        txLogAttrs = append(txLogAttrs, ...)
    }

which had a few problems:
1. Using 0 for size then appending is quite slow yet we know the exact size
2. Using append instead of indexing is slower

If we examine the advisory at https://bencher.orijtech.com/perfclinic/sliceupdate/
and the verdict at https://bencher.orijtech.com/perfclinic/sliceupdate/#verdict
this new scheme shows a massive improvement in that call site.

Fixes #825
2021-12-14 00:05:12 +00:00
..
atlas docs: banner & other (#607) 2021-09-29 18:15:55 +02:00
client feat: add raw ethereum tx CLI (#712) 2021-11-02 12:20:19 +01:00
keeper x/evm/keeper: use the fastest slice making idiom for Keeper.EthereumTx.Logs (#827) 2021-12-14 00:05:12 +00:00
simulation evm: fixed commented out simulations, pubsub, and handler tests (#655) 2021-10-11 13:09:53 +02:00
spec docs: update EVM spec (#824) 2021-12-10 20:15:17 +01:00
types tests: eth_sendRawTx (#804) 2021-12-01 09:38:59 +01:00
genesis_test.go all: bump SDK to v0.43.0-rc0 (#194) 2021-06-29 13:02:21 -04:00
genesis.go evm: remove tx logs and block bloom from chain state (#556) 2021-09-15 09:45:03 +00:00
handler_test.go evm: clear access list for each transaction (#802) 2021-11-30 12:36:10 +01:00
handler.go evm: rm recover (#542) 2021-09-09 09:10:33 +00:00
module.go feat: store migration setup (#794) 2021-11-29 16:46:20 +01:00