Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track Stack size explicit in Dispatcher Funktion #161

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

HerbertJordan
Copy link
Collaborator

This PR moves the tracking of the stack pointer and the stack size into the RunInterpreter.

With GCC 11.4.0:

goos: linux
goarch: amd64
pkg: github.com/Fantom-foundation/Tosca/go/vm/test
cpu: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
                            │   base.log    │       track_size_explicit.log       │
                            │    sec/op     │    sec/op     vs base               │
Inc/1/evmzero-4                2.162µ ±  6%   2.110µ ±  8%        ~ (p=0.273 n=7)
Inc/10/evmzero-4               2.152µ ±  6%   2.014µ ±  6%   -6.41% (p=0.004 n=7)
Fib/1/evmzero-4                2.033µ ±  8%   1.930µ ±  7%   -5.07% (p=0.007 n=7)
Fib/5/evmzero-4                6.878µ ± 12%   6.364µ ±  7%   -7.47% (p=0.001 n=7)
Fib/10/evmzero-4               62.32µ ± 10%   56.23µ ± 10%   -9.77% (p=0.038 n=7)
Fib/15/evmzero-4               665.9µ ±  9%   600.2µ ±  7%   -9.87% (p=0.004 n=7)
Fib/20/evmzero-4               6.535m ± 11%   6.030m ±  5%   -7.73% (p=0.001 n=7)
Sha3/1/evmzero-4               1.510µ ± 13%   1.509µ ±  3%        ~ (p=0.875 n=7)
Sha3/10/evmzero-4              2.598µ ±  3%   2.591µ ±  8%        ~ (p=0.620 n=7)
Sha3/100/evmzero-4             13.66µ ±  6%   13.66µ ±  5%        ~ (p=0.734 n=7)
Sha3/1000/evmzero-4            124.6µ ±  5%   123.9µ ±  6%        ~ (p=0.710 n=7)
Arith/1/evmzero-4              2.439µ ± 10%   2.231µ ±  7%   -8.53% (p=0.001 n=7)
Arith/10/evmzero-4             5.888µ ±  8%   4.695µ ± 10%  -20.26% (p=0.001 n=7)
Arith/100/evmzero-4            38.64µ ±  9%   27.45µ ±  6%  -28.97% (p=0.001 n=7)
Arith/280/evmzero-4           108.82µ ±  6%   77.44µ ± 11%  -28.84% (p=0.001 n=7)
Memory/1/evmzero-4             3.353µ ±  7%   2.921µ ±  7%  -12.88% (p=0.001 n=7)
Memory/10/evmzero-4            7.806µ ± 10%   6.104µ ±  6%  -21.80% (p=0.001 n=7)
Memory/100/evmzero-4           50.50µ ± 11%   37.84µ ±  6%  -25.06% (p=0.001 n=7)
Memory/1000/evmzero-4          493.0µ ±  8%   380.9µ ±  3%  -22.75% (p=0.001 n=7)
Memory/10000/evmzero-4         4.220m ±  3%   3.305m ±  8%  -21.68% (p=0.001 n=7)
Analysis/jumpdest/evmzero-4    1.309µ ±  7%   1.323µ ±  7%        ~ (p=0.456 n=7)
Analysis/stop/evmzero-4        1.306µ ±  9%   1.349µ ±  7%        ~ (p=0.535 n=7)
Analysis/push1/evmzero-4       1.311µ ±  8%   1.346µ ±  7%        ~ (p=0.902 n=7)
Analysis/push32/evmzero-4      1.306µ ±  5%   1.319µ ±  5%        ~ (p=0.333 n=7)
geomean                        15.78µ         14.16µ        -10.30%

With clang 14.0.0:

goos: linux
goarch: amd64
pkg: github.com/Fantom-foundation/Tosca/go/vm/test
cpu: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
                            │ base_clang.log │    track_size_explicit_clang.log    │
                            │     sec/op     │    sec/op     vs base               │
Inc/1/evmzero-4                 1.849µ ±  6%   1.819µ ±  8%        ~ (p=0.274 n=7)
Inc/10/evmzero-4                1.902µ ±  6%   1.831µ ±  7%        ~ (p=0.053 n=7)
Fib/1/evmzero-4                 1.748µ ±  7%   1.748µ ±  5%        ~ (p=0.831 n=7)
Fib/5/evmzero-4                 5.577µ ±  9%   5.396µ ±  7%   -3.25% (p=0.017 n=7)
Fib/10/evmzero-4                49.11µ ±  7%   43.90µ ± 12%  -10.62% (p=0.004 n=7)
Fib/15/evmzero-4                556.1µ ±  6%   511.4µ ±  8%   -8.03% (p=0.004 n=7)
Fib/20/evmzero-4                5.389m ±  3%   4.721m ±  9%  -12.39% (p=0.001 n=7)
Sha3/1/evmzero-4                1.404µ ±  6%   1.402µ ± 10%        ~ (p=0.805 n=7)
Sha3/10/evmzero-4               2.264µ ±  2%   2.220µ ±  6%        ~ (p=0.620 n=7)
Sha3/100/evmzero-4              11.00µ ±  5%   10.50µ ± 14%        ~ (p=0.121 n=7)
Sha3/1000/evmzero-4             95.17µ ±  6%   91.32µ ± 11%        ~ (p=0.259 n=7)
Arith/1/evmzero-4               2.030µ ±  5%   1.996µ ±  4%        ~ (p=0.209 n=7)
Arith/10/evmzero-4              4.514µ ±  6%   4.194µ ±  8%        ~ (p=0.073 n=7)
Arith/100/evmzero-4             28.34µ ±  7%   25.47µ ±  9%  -10.13% (p=0.001 n=7)
Arith/280/evmzero-4             76.31µ ±  8%   70.09µ ±  7%   -8.15% (p=0.007 n=7)
Memory/1/evmzero-4              2.550µ ±  8%   2.422µ ±  5%   -5.02% (p=0.004 n=7)
Memory/10/evmzero-4             4.998µ ±  6%   4.579µ ±  8%   -8.38% (p=0.004 n=7)
Memory/100/evmzero-4            29.10µ ± 11%   25.18µ ±  6%  -13.48% (p=0.001 n=7)
Memory/1000/evmzero-4           307.3µ ±  7%   258.2µ ± 10%  -15.99% (p=0.001 n=7)
Memory/10000/evmzero-4          2.544m ±  6%   2.240m ± 33%  -11.92% (p=0.026 n=7)
Analysis/jumpdest/evmzero-4     1.262µ ±  8%   1.263µ ±  9%        ~ (p=0.617 n=7)
Analysis/stop/evmzero-4         1.257µ ±  5%   1.262µ ±  7%        ~ (p=0.430 n=7)
Analysis/push1/evmzero-4        1.258µ ±  7%   1.255µ ±  4%        ~ (p=0.620 n=7)
Analysis/push32/evmzero-4       1.255µ ±  8%   1.307µ ±  5%        ~ (p=0.274 n=7)
geomean                         12.57µ         11.88µ         -5.46%

@HerbertJordan HerbertJordan force-pushed the herbert/reduce_dispatcher_overhead branch from 144ed74 to b80d84d Compare September 8, 2023 13:27
@W4RH4WK W4RH4WK added the performance Issue likely impacts performance label Sep 11, 2023
cpp/vm/evmzero/interpreter.cc Outdated Show resolved Hide resolved
cpp/vm/evmzero/interpreter.cc Outdated Show resolved Hide resolved
cpp/vm/evmzero/interpreter.cc Outdated Show resolved Hide resolved
@HerbertJordan HerbertJordan force-pushed the herbert/reduce_dispatcher_overhead branch from b80d84d to 10c39e1 Compare September 11, 2023 13:29
@HerbertJordan HerbertJordan force-pushed the herbert/reduce_dispatcher_overhead branch from 10c39e1 to 2c8e537 Compare September 11, 2023 13:47
@HerbertJordan HerbertJordan merged commit a4f3359 into main Sep 11, 2023
4 checks passed
@HerbertJordan HerbertJordan deleted the herbert/reduce_dispatcher_overhead branch September 11, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issue likely impacts performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants