Skip to content
Instructions for benchmarking Ewasm precompiles. (And results.)
Branch: report
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md

README.md

EVM benchmarks (2019-05-23)

Introduction

These benchmarks were prepared by the Ewasm team. This section on EVM is an excerpt from a forthcoming benchmarking report (which is not published yet but will be soon(TM)), made available for the purpose of discussion around EIP-2045: Particle gas costs.

The results below show evmone setting new speed records, demonstrating the performance attainable by executing EVM bytecode in an optimized interpreter.

Benchmarks

sha1

Sha1 with shift opcodes uses SHL and SHR opcodes (adopted in Constantinople).

blake2b

Blake2b with shift opcodes uses SHL and SHR opcodes (adopted in Constantinople).

Blake2b with Huff optimizations (more info here).

bn128mul

The bn128mul implementation for EVM is Weierstrudel, written in Huff, from AZTEC Protocol.

The geth-precompile and parity-precompile is the native Go and Rust code used for the ECMUL precompile in geth and parity (adopted in Byzantium).

Cita-evm is slower than parity-evm because the latest parity release uses a num-bigint library with an optimization for 256-bit division (which is used by the MULMOD opcode), but cita-evm has not updated to use that library.

bn256mulG2

Multiplication of Bn128/Bn256 G2 points (see musalbas/solidity-BN256G2 and 0xAshish/solidity-BN256G2).

Methodology details

which EVM implementations are benchmarked and how?

Four EVM implementations are benchmarked:

  1. geth - around v1.8.25 from 2019-04-12 (this branch using this benchmarking code).
  2. parity - around beta 2.5.1 from 2019-05-14 (this branch using this benchmarking code).
  3. cita-vm - master around 2019-05-20 (this benchmarking code).
  4. evmone - master around 2019-04-10 (this benchmarking code).

Benchmarking also involved some dockerfiles and python scripts, which will be better documented soon.

Where can I find the EVM bytecode that was benchmarked?

Here for now.

What machine and OS was used to run the benchmarks?

An Azure VM and Ubuntu 18.

$ cat /proc/cpuinfo | grep "model name"| head
model name      : Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
model name      : Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
model name      : Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
model name      : Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz

More about evmone and cita-vm

cita-vm:

Cita-vm is a rust implementation. From the readme:

Fast EVM implementation for CITA. Tuned for high performance, up to 5x faster than parity.

See other benchmarks in the cita-vm readme.

evmone:

Evmone is a C++ implementation focused on speed.

From the readme:

The C++ implementation of the Ethereum Virtual Machine (EVM) focused on speed. Compatible with EVMC.

Characteristic of evmone

  1. The "indirect" subroutine threading is the dispatch method - a table with pointers to subroutines is prepared during the analysis of the bytecode.
  2. The gas cost and stack requirements of block of instructions is precomputed and applied once per block during execution.
  3. The intx library is used to provide 256-bit integer precision.
  4. The ethash library is used to provide Keccak hash function implementation needed for the special SHA3 instruction.
You can’t perform that action at this time.