Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save timxor/5f292c9c4efb978cc2a0502f0b0225b2 to your computer and use it in GitHub Desktop.
Save timxor/5f292c9c4efb978cc2a0502f0b0225b2 to your computer and use it in GitHub Desktop.
How to run tims parity benchmarks on your computer (linux/ubuntu)
git clone https://github.com/tcsiwula/parity -b tims_benchmarks
cd parity
rustup override set nightly

Next command takes 5/10 minutes or so to compile:

cargo bench -p ethcore

Should yield similar results:

test views::block::tests::test_block_view ... ignored
test views::body::tests::test_block_view ... ignored
test views::header::tests::test_header_view ... ignored
test views::transaction::tests::test_transaction_view ... ignored

test result: ok. 0 passed; 0 failed; 428 ignored; 0 measured; 0 filtered out

     Running target/release/deps/evm-951fe081a6b8fa68

running 20 tests
test bn_128_add          ... bench:      14,738 ns/iter (+/- 6,839)
test bn_128_mul          ... bench:     906,528 ns/iter (+/- 47,898)
test bn_128_pairing      ... bench:   9,389,759 ns/iter (+/- 238,981)
test ecrecover           ... bench:     171,418 ns/iter (+/- 6,510)
test modexp_1_pow0x10001 ... bench:      84,416 ns/iter (+/- 3,198)
test modexp_1_qube       ... bench:      15,915 ns/iter (+/- 818)
test modexp_1_square     ... bench:      10,918 ns/iter (+/- 362)
test modexp_2_pow0x10001 ... bench:     209,112 ns/iter (+/- 18,417)
test modexp_2_qube       ... bench:      36,232 ns/iter (+/- 2,928)
test modexp_2_square     ... bench:      24,709 ns/iter (+/- 4,128)
test modexp_3_pow0x10001 ... bench:     655,461 ns/iter (+/- 200,168)
test modexp_3_qube       ... bench:     110,525 ns/iter (+/- 7,614)
test modexp_3_square     ... bench:      74,690 ns/iter (+/- 4,092)
test modexp_4_pow0x10001 ... bench:   2,079,294 ns/iter (+/- 711,949)
test modexp_4_qube       ... bench:     343,332 ns/iter (+/- 6,962)
test modexp_4_square     ... bench:     232,197 ns/iter (+/- 106,911)
test modexp_5_pow0x10001 ... bench:   7,126,826 ns/iter (+/- 1,425,467)
test modexp_5_qube       ... bench:   1,195,532 ns/iter (+/- 48,562)
test modexp_5_square     ... bench:     792,480 ns/iter (+/- 46,469)
test sha256              ... bench:       1,826 ns/iter (+/- 203)

test result: ok. 0 passed; 0 failed; 0 ignored; 20 measured; 0 filtered out

=>

@pirapira
Copy link

Yes, I could follow the procedure. Your machine is 10 percent faster than mine. I envy you. (Only on bn_128_add, my machine is slightly faster. Weird.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment