Skip to content

Instantly share code, notes, and snippets.

@chfast
chfast / fizzy_05_performance_comparison.md
Last active Sep 29, 2020
Compare performance of Fizzy 0.5, WABT 1.0.12, WABT 1.0.19, wasm3 0.4.7
View fizzy_05_performance_comparison.md

Instantiation

                         fizzy 0.5.0  fizzy 0.4.0   wabt 1.0.19  wasm3 0.4.7
                 abs. [µs]  rel. [%]     rel. [%]      rel. [%]     rel. [%]
geometric mean                   100          101           279           27
blake2b                 28       100           99           306           38
ecpairing             1399       100          101           305            3
keccak256               47       100          103           289           18
memset                  10       100          100           285           79
@chfast
chfast / results.md
Created Sep 15, 2020
Fizzy vs WABT and wasm3
View results.md
[wasm3 vs. fizzy]/execute/blake2b/512_bytes_rounds_1_mean                     +3.0371         +3.0371            21            86            21            86
[wasm3 vs. fizzy]/execute/blake2b/512_bytes_rounds_16_mean                    +2.9860         +2.9860           328          1309           328          1309
[wasm3 vs. fizzy]/execute/ecpairing/onepoint_mean                             +1.7467         +1.7466        161430        443391        161431        443395
[wasm3 vs. fizzy]/execute/keccak256/512_bytes_rounds_1_mean                   +4.9237         +4.9237            18           105            18           105
[wasm3 vs. fizzy]/execute/keccak256/512_bytes_rounds_16_mean                  +4.9273         +4.9273           261          1549           261          1549
[wasm3 vs. fizzy]/execute/memset/256_bytes_mean                               +2.9192         +2.9192             2             7             2             7
[wasm3 vs. fizzy]/execute/memset/60000_bytes_mean                       
@chfast
chfast / fizzy_0.1_to_0.2.txt
Created Jul 7, 2020
Comparing performance of Fizzy 0.1 to 0.2
View fizzy_0.1_to_0.2.txt
Comparing Fizzy 0.1 to 0.2
Benchmark CPU Time [µs] Old New
----------------------------------------------------------------------------
fizzy/parse/blake2b +0.1637 12 14
fizzy/instantiate/blake2b +0.1793 16 19
fizzy/parse/ecpairing +0.1551 681 786
fizzy/instantiate/ecpairing +0.1352 730 828
fizzy/parse/keccak256 +0.2674 20 26
fizzy/instantiate/keccak256 +0.2974 24 31
@chfast
chfast / benchmark_results.txt
Created Jun 23, 2020
Quick check of evmone performance 0.1.1 vs 0.4.1 and GCC-7 vs GCC-10
View benchmark_results.txt
Comparing v0.1.1/gcc-7 to v0.1.1/gcc-10
Benchmark Time CPU Time Old Time New CPU Old CPU New
------------------------------------------------------------------------------------------------------------------------------
blake2b_huff/8415nulls_mean -0.0278 -0.0278 1502 1460 1502 1460
blake2b_shifts/8415nulls_mean -0.0415 -0.0415 23791 22804 23790 22803
Comparing v0.1.1/gcc-10 to v0.4.1/gcc-10
Benchmark Time CPU Time Old Time New CPU Old CPU New
------------------------------------------------------------------------------------------------------------------------------
View fizzy_vs_wabt_bls_benchmark.txt
# Get data with:
> bin/fizzy-bench ../../test/benchmarks --benchmark_min_time=1 --benchmark_repetitions=10 --be
nchmark_filter='(fizzy|wabt).*bls' --benchmark_out=bls
# Compare benchmark filters, aggregate data with compare.py from https://github.com/google/benchmark/blob/master/tools/compare.py (it requires some dependencies to be installed with pip).
> compare.py -a filters bls 'fizzy' ' wabt'
Comparing fizzy to wabt (from bls)
Benchmark Time CPU Time Old Time New CPU Old CPU New
----------------------------------------------------------------------------------------------------------------------------------------------------
@chfast
chfast / README.md
Last active Jun 2, 2020
EVM stack height and memory size stats for Ethereum mainnet
View README.md
@chfast
chfast / uint384.yul
Created May 5, 2020
384-bit integer implementation in EVM
View uint384.yul
object "test" {
code {
// This assumes each limb is 256-bit and the half of the second limb is not dirty.
function add_with_carry_384_orig(x1, x2, y1, y2) -> out1, out2, carry {
// limb 1
out1 := add(x1, y1)
carry := lt(out1, x1)
// limb 2
View wasm_highlighting_test.md

webassembly

(module
    (memory 1)
    (func (export "test") (param i32 i32) (result i32)
      get_local 0
      get_local 1
      i32.xor
    )
View aleth-201912160852.log
This file has been truncated, but you can view the full file.
aleth, a C++ Ethereum client
INFO 12-16 08:52:24 aleth net Id: ##0c61fc7f…
INFO 12-16 08:52:24 aleth net ENR: [ seq=12 id=v4 key=020c61fc… ip=3.132.57.159 tcp=30303 udp=30303 ]
aleth 1.8.0-alpha.1
INFO 12-16 08:52:26 p2p  info UPnP device not found.
INFO 12-16 08:52:26 p2p  net Active peer count: 0
INFO 12-16 08:52:26 p2p  net Looking for peers...
Node ID: enode://0c61fc7fd20b3a5cabe69a37011b271b61fc405a74dabe44f7ab4ea32791b64e7745be2e247b7c7f9150636a9afbbf74aff285381e5478b919bcb5c76c193dec@127.0.0.1:30303
INFO 12-16 08:52:26 aleth rpc JSON-RPC socket path: /home/ubuntu/.ethereum/geth.ipc
@chfast
chfast / aleth.log
Created Nov 12, 2019
Aleth: Huge exception dump
View aleth.log
INFO 11-12 17:04:15 eth client 308 blocks imported in 1650 ms (186.656 blocks/s) in #987928
INFO 11-12 17:04:16 eth client 277 blocks imported in 1201 ms (230.612 blocks/s) in #988205
INFO 11-12 17:04:17 eth client 249 blocks imported in 941 ms (264.429 blocks/s) in #988454
INFO 11-12 17:04:18 eth client 249 blocks imported in 710 ms (350.666 blocks/s) in #988703
WARN 11-12 17:04:18 eth warn Exception thrown in Worker thread: /home/chfast/Projects/ethereum/aleth/libethereum/EthereumCapability.cpp(1008): Throw in function dev::eth::EthereumPeer& dev::eth::EthereumCapability::peer(const NodeID&)
Dynamic exception type: boost::wrapexcept<dev::eth::PeerDisconnected>
[dev::tag_nodeID*] = 700f30d9d0ef10d2bc43a18baaf94f2c4b865ddef582b2b9bcaf0039148d7baa76ded66665fbb86d74d21b3635ff2f605d0aa2861a615cd6ef000690a4cccb38
WARN 11-12 17:04:18 p2p ethcap Peer ##10f5c3b9… causing an exception: /home/chfast/Projects/ethereum/aleth/libethereum/EthereumCapability.cpp(1008): Throw in function dev::eth::EthereumPee
You can’t perform that action at this time.