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

core/vm: Don't copy JumpTable when no extra EIP modifications needed #23977

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Nov 25, 2021

No description provided.

@gumb0
Copy link
Member Author

gumb0 commented Nov 26, 2021

name                                  old time/op  new time/op  delta
main/blake2b_shifts/2805nulls         15.9ms ± 1%  15.8ms ± 1%    -1.02%  (p=0.001 n=9+10)
main/blake2b_shifts/5610nulls         31.8ms ± 1%  31.6ms ± 2%      ~     (p=0.123 n=10+10)
main/blake2b_shifts/8415nulls         51.3ms ± 7%  53.8ms ± 3%      ~     (p=0.203 n=10+8)
main/weierstrudel/0                    515µs ± 1%   508µs ± 1%    -1.39%  (p=0.000 n=10+10)
main/weierstrudel/1                   1.10ms ± 0%  1.08ms ± 0%    -1.93%  (p=0.000 n=10+9)
main/weierstrudel/3                   1.72ms ± 1%  1.68ms ± 0%    -2.24%  (p=0.000 n=10+9)
main/weierstrudel/9                   3.56ms ± 0%  3.49ms ± 0%    -1.98%  (p=0.000 n=9+9)
main/weierstrudel/14                  5.06ms ± 0%  4.97ms ± 0%    -1.78%  (p=0.000 n=9+9)
main/sha1_divs/empty                   239µs ± 0%   239µs ± 0%    +0.15%  (p=0.008 n=9+8)
main/sha1_divs/1351                   4.74ms ± 1%  4.75ms ± 1%      ~     (p=0.436 n=10+10)
main/sha1_divs/2737                   9.21ms ± 1%  9.27ms ± 1%    +0.60%  (p=0.001 n=9+10)
main/sha1_divs/5311                   18.0ms ± 0%  18.2ms ± 1%    +0.88%  (p=0.000 n=7+10)
main/sha1_shifts/empty                 191µs ± 1%   191µs ± 0%      ~     (p=0.136 n=9+9)
main/sha1_shifts/1351                 3.78ms ± 0%  3.90ms ± 1%    +3.25%  (p=0.000 n=10+9)
main/sha1_shifts/2737                 7.36ms ± 1%  7.60ms ± 1%    +3.34%  (p=0.000 n=9+10)
main/sha1_shifts/5311                 14.4ms ± 1%  14.8ms ± 1%    +2.70%  (p=0.000 n=9+10)
main/blake2b_huff/empty                116µs ± 1%   112µs ± 1%    -3.32%  (p=0.000 n=10+10)
main/blake2b_huff/2805nulls           2.16ms ± 0%  2.13ms ± 1%    -1.49%  (p=0.000 n=9+10)
main/blake2b_huff/5610nulls           4.17ms ± 0%  4.10ms ± 0%    -1.66%  (p=0.000 n=9+10)
main/blake2b_huff/8415nulls           6.09ms ± 0%  6.00ms ± 0%    -1.38%  (p=0.000 n=9+10)
micro/JUMPDEST_n0/empty               3.31ms ± 2%  3.45ms ± 5%    +4.40%  (p=0.000 n=10+10)
micro/jump_around/empty                163µs ± 0%   161µs ± 3%    -1.43%  (p=0.002 n=10+10)
micro/memory_grow_mstore/nogrow        483µs ± 1%   470µs ± 2%    -2.73%  (p=0.000 n=10+10)
micro/memory_grow_mstore/by1           493µs ± 1%   499µs ± 2%    +1.20%  (p=0.009 n=10+8)
micro/memory_grow_mstore/by16          601µs ± 2%   604µs ± 3%      ~     (p=0.356 n=10+9)
micro/memory_grow_mstore/by32          691µs ± 1%   693µs ± 0%      ~     (p=0.278 n=10+9)
micro/signextend/zero                  493µs ± 0%   483µs ± 1%    -1.89%  (p=0.000 n=9+10)
micro/signextend/one                   510µs ± 4%   493µs ± 2%    -3.23%  (p=0.000 n=10+10)
micro/loop_with_many_jumpdests/empty  3.83µs ± 3%  1.87µs ± 2%   -51.28%  (p=0.000 n=9+10)
micro/memory_grow_mload/nogrow         249µs ± 1%   243µs ± 1%    -2.24%  (p=0.000 n=10+9)
micro/memory_grow_mload/by1            259µs ± 1%   261µs ± 1%    +0.76%  (p=0.023 n=10+10)
micro/memory_grow_mload/by16           343µs ± 1%   343µs ± 2%      ~     (p=0.549 n=10+9)
micro/memory_grow_mload/by32           448µs ± 0%   445µs ± 1%    -0.72%  (p=0.011 n=9+9)
[Geo mean]                            1.35ms       1.32ms         -2.40%

name                                  old gas/s    new gas/s    delta
main/blake2b_shifts/2805nulls           215M ± 1%    217M ± 1%    +1.03%  (p=0.001 n=9+10)
main/blake2b_shifts/5610nulls           234M ± 1%    236M ± 2%      ~     (p=0.123 n=10+10)
main/blake2b_shifts/8415nulls           236M ± 7%    224M ± 3%      ~     (p=0.203 n=10+8)
main/weierstrudel/0                    92.3M ± 1%   93.6M ± 1%    +1.41%  (p=0.000 n=10+10)
main/weierstrudel/1                     118M ± 0%    121M ± 0%    +1.97%  (p=0.000 n=10+9)
main/weierstrudel/3                     117M ± 1%    120M ± 0%    +2.29%  (p=0.000 n=10+9)
main/weierstrudel/9                     117M ± 0%    120M ± 0%    +2.02%  (p=0.000 n=9+9)
main/weierstrudel/14                    118M ± 0%    120M ± 0%    +1.81%  (p=0.000 n=9+9)
main/sha1_divs/empty                    152M ± 0%    152M ± 0%    -0.15%  (p=0.008 n=9+8)
main/sha1_divs/1351                     166M ± 1%    166M ± 1%      ~     (p=0.436 n=10+10)
main/sha1_divs/2737                     167M ± 1%    166M ± 1%    -0.59%  (p=0.001 n=9+10)
main/sha1_divs/5311                     166M ± 0%    165M ± 1%    -0.87%  (p=0.000 n=7+10)
main/sha1_shifts/empty                  185M ± 1%    184M ± 0%      ~     (p=0.136 n=9+9)
main/sha1_shifts/1351                   201M ± 0%    195M ± 1%    -3.15%  (p=0.000 n=10+9)
main/sha1_shifts/2737                   202M ± 1%    195M ± 1%    -3.23%  (p=0.000 n=9+10)
main/sha1_shifts/5311                   202M ± 1%    196M ± 1%    -2.63%  (p=0.000 n=9+10)
main/blake2b_huff/empty                 121M ± 1%    125M ± 1%    +3.44%  (p=0.000 n=10+10)
main/blake2b_huff/2805nulls             142M ± 0%    144M ± 1%    +1.51%  (p=0.000 n=9+10)
main/blake2b_huff/5610nulls             144M ± 0%    146M ± 0%    +1.68%  (p=0.000 n=9+10)
main/blake2b_huff/8415nulls             145M ± 0%    147M ± 0%    +1.40%  (p=0.000 n=9+10)
micro/JUMPDEST_n0/empty                 160M ± 2%    153M ± 5%    -4.16%  (p=0.000 n=10+10)
micro/jump_around/empty                 302M ± 0%    306M ± 3%    +1.46%  (p=0.002 n=10+10)
micro/memory_grow_mstore/nogrow         127M ± 1%    131M ± 2%    +2.81%  (p=0.000 n=10+10)
micro/memory_grow_mstore/by1            125M ± 1%    124M ± 2%    -1.17%  (p=0.009 n=10+8)
micro/memory_grow_mstore/by16           126M ± 2%    125M ± 3%      ~     (p=0.356 n=10+9)
micro/memory_grow_mstore/by32           154M ± 1%    154M ± 0%      ~     (p=0.278 n=10+9)
micro/signextend/zero                   195M ± 0%    199M ± 1%    +1.93%  (p=0.000 n=9+10)
micro/signextend/one                    188M ± 4%    195M ± 2%    +3.30%  (p=0.000 n=10+10)
micro/loop_with_many_jumpdests/empty   8.36M ± 3%  17.15M ± 2%  +105.22%  (p=0.000 n=9+10)
micro/memory_grow_mload/nogrow          230M ± 1%    236M ± 1%    +2.29%  (p=0.000 n=10+9)
micro/memory_grow_mload/by1             223M ± 1%    221M ± 1%    -0.75%  (p=0.023 n=10+10)
micro/memory_grow_mload/by16            209M ± 1%    209M ± 2%      ~     (p=0.549 n=10+9)
micro/memory_grow_mload/by32            229M ± 0%    230M ± 1%    +0.73%  (p=0.011 n=9+9)
[Geo mean]                              151M         155M         +2.45%

@gumb0 gumb0 marked this pull request as ready for review November 29, 2021 13:52
}
for i, eip := range cfg.ExtraEips {
if err := EnableEIP(eip, &jt); err != nil {
var jtCopy JumpTable = *cfg.JumpTable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit copy := *cfg.JumpTable, no need to add the type to it.

@karalabe karalabe added this to the 1.10.14 milestone Nov 30, 2021
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@karalabe karalabe merged commit 163f166 into ethereum:master Nov 30, 2021
@chfast chfast deleted the optimize-newevminterpreter branch November 30, 2021 13:13
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
gzliudan pushed a commit to gzliudan/XDPoSChain that referenced this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants