Emmanuel T OdekeandFederico Kunze Küllmer 8333765b27 x/evm/keeper: save 24B with Go in-condition variable idiom (#828)
* x/evm/keeper: save 24B with Go in-condition variable idiom

The prior code doubly invoked (*ethereum/go-ethereum/core/types.Transaction).To()
which is quite expensive, and firstly copies 20 bytes each time, then
that gets rounded up to the proper size class/pointer alignment so on
64-bit machines 20B -> 24B.

Isolating a benchmark for this code per issue #826 shows this saves
quite a bit of bytes and some nano seconds which all count up towards
the transactions per seconds being processed:

```shell
$ benchstat before.txt after.txt
name        old time/op    new time/op    delta
CopyAddr-8    38.4ns ± 3%    19.3ns ± 3%  -49.66%  (p=0.000 n=10+10)

name        old alloc/op   new alloc/op   delta
CopyAddr-8     48.0B ± 0%     24.0B ± 0%  -50.00%  (p=0.000 n=10+10)

name        old allocs/op  new allocs/op  delta
CopyAddr-8      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.000 n=10+10)
```

Fixes #826

* changelog

* lint

* Revert stray changes that were used in testing

* rm log

Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
2021-12-14 00:51:36 +01:00
2021-10-08 12:07:03 +00:00
2021-11-25 15:12:57 +00:00
2021-11-29 16:46:20 +01:00
2021-08-26 15:21:43 +00:00
2021-11-26 18:10:40 +00:00
2021-12-01 09:38:59 +01:00
2021-09-28 09:48:11 +00:00
2021-04-18 18:39:15 +02:00
2021-08-04 09:30:13 +00:00
2021-09-16 08:36:08 +00:00
2021-08-04 09:30:13 +00:00
2021-10-29 15:56:09 +02:00
2018-07-17 11:52:20 -04:00
2021-09-05 11:03:06 +00:00
2021-08-04 09:30:13 +00:00
2021-08-17 14:11:26 +00:00
2021-11-30 09:22:21 +01:00
2021-11-06 22:01:58 +00:00
2021-11-09 19:50:27 +00:00
2021-08-26 15:21:43 +00:00

Ethermint

banner

Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on top of Tendermint Core consensus engine.

Note: Requires Go 1.17+

Installation

For prerequisites and detailed build instructions please read the Evmos Installation instructions. Once the dependencies are installed, run:

make install

Or check out the latest release.

Quick Start

To learn how the Ethermint works from a high-level perspective, go to the Introduction section from the documentation. You can also check the instructions to Run a Node.

For an example on how Ethermint can be used on any Cosmos-SDK chain, please refer to Evmos.

Community

The following chat channels and forums are a great spot to ask questions about Ethermint:

Contributing

Looking for a good place to start contributing? Check out some good first issues.

For additional instructions, standards and style guides, please refer to the Contributing document.

Careers

See our open positions on Cosmos Jobs, Notion, or feel free to reach out via email.

S
Description
Laconic state machine
Readme
44 MiB
0 Stars 4 Watchers 0 Forks
Languages
Go 79.9%
Solidity 6.4%
Python 5.2%
JavaScript 4.8%
Shell 2.1%
Other 1.5%