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

[WIP] Herbert/use side channel for state changes #162

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HerbertJordan
Copy link
Collaborator

@HerbertJordan HerbertJordan commented Sep 8, 2023

The idea of this PR is to remove the hardly modified state from the data that is propagated copied and checked in the interpreter loop. Instead, the program pointer (pc) is used to signal termination.

On Clang: 14.0.0, based on #161

goos: linux
goarch: amd64
pkg: github.com/Fantom-foundation/Tosca/go/vm/test
cpu: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
                            │ track_size_explicit_clang.log │     state_on_the_side_clang.log     │
                            │            sec/op             │    sec/op     vs base               │
Inc/1/evmzero-4                                1.819µ ±  8%   1.962µ ± 36%        ~ (p=0.097 n=7)
Inc/10/evmzero-4                               1.831µ ±  7%   1.771µ ±  6%        ~ (p=0.057 n=7)
Fib/1/evmzero-4                                1.748µ ±  5%   1.680µ ±  3%   -3.89% (p=0.005 n=7)
Fib/5/evmzero-4                                5.396µ ±  7%   5.102µ ±  7%        ~ (p=0.073 n=7)
Fib/10/evmzero-4                               43.90µ ± 12%   41.48µ ±  8%   -5.51% (p=0.026 n=7)
Fib/15/evmzero-4                               511.4µ ±  8%   456.6µ ± 12%  -10.72% (p=0.038 n=7)
Fib/20/evmzero-4                               4.721m ±  9%   4.629m ±  6%        ~ (p=0.097 n=7)
Sha3/1/evmzero-4                               1.402µ ± 10%   1.404µ ±  5%        ~ (p=0.710 n=7)
Sha3/10/evmzero-4                              2.220µ ±  6%   2.177µ ±  4%        ~ (p=0.259 n=7)
Sha3/100/evmzero-4                             10.50µ ± 14%   10.16µ ±  5%        ~ (p=0.120 n=7)
Sha3/1000/evmzero-4                            91.32µ ± 11%   89.04µ ±  5%        ~ (p=0.259 n=7)
Arith/1/evmzero-4                              1.996µ ±  4%   1.964µ ±  6%        ~ (p=0.103 n=7)
Arith/10/evmzero-4                             4.194µ ±  8%   4.034µ ±  5%   -3.81% (p=0.017 n=7)
Arith/100/evmzero-4                            25.47µ ±  9%   24.20µ ±  6%        ~ (p=0.165 n=7)
Arith/280/evmzero-4                            70.09µ ±  7%   66.58µ ±  9%        ~ (p=0.209 n=7)
Memory/1/evmzero-4                             2.422µ ±  5%   2.341µ ±  4%   -3.34% (p=0.026 n=7)
Memory/10/evmzero-4                            4.579µ ±  8%   4.378µ ±  7%   -4.39% (p=0.017 n=7)
Memory/100/evmzero-4                           25.18µ ±  6%   25.07µ ±  8%        ~ (p=0.383 n=7)
Memory/1000/evmzero-4                          258.2µ ± 10%   235.8µ ± 10%        ~ (p=0.053 n=7)
Memory/10000/evmzero-4                         2.240m ± 33%   2.091m ±  7%   -6.66% (p=0.017 n=7)
Analysis/jumpdest/evmzero-4                    1.263µ ±  9%   1.262µ ±  6%        ~ (p=0.712 n=7)
Analysis/stop/evmzero-4                        1.262µ ±  7%   1.276µ ±  4%        ~ (p=0.804 n=7)
Analysis/push1/evmzero-4                       1.255µ ±  4%   1.263µ ±  5%        ~ (p=0.514 n=7)
Analysis/push32/evmzero-4                      1.307µ ±  5%   1.269µ ±  7%        ~ (p=0.535 n=7)
geomean                                        11.88µ         11.52µ         -3.01%

@HerbertJordan HerbertJordan changed the base branch from main to herbert/reduce_dispatcher_overhead September 8, 2023 15:21
@HerbertJordan HerbertJordan force-pushed the herbert/reduce_dispatcher_overhead branch 2 times, most recently from 10c39e1 to 2c8e537 Compare September 11, 2023 13:47
Base automatically changed from herbert/reduce_dispatcher_overhead to main September 11, 2023 13:56
@HerbertJordan HerbertJordan force-pushed the herbert/use_side_channel_for_state_changes branch 2 times, most recently from 55fd23d to 8f832c3 Compare September 12, 2023 06:21
@HerbertJordan HerbertJordan force-pushed the herbert/use_side_channel_for_state_changes branch from 8f832c3 to 66b5511 Compare September 12, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant