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

BEGINBLOCK intrinsic instruction #74

Merged
merged 4 commits into from
Jun 24, 2019
Merged

BEGINBLOCK intrinsic instruction #74

merged 4 commits into from
Jun 24, 2019

Conversation

chfast
Copy link
Member

@chfast chfast commented Jun 24, 2019

Instead of checking if an instruction starts a basic block, an "internal" BEGINBLOCK instruction is inserted that performs basic block checks. This simplifies the dispatch loop implementation and removes a branch there.

This gives 2% - 8% execution speed improvement.

Comparing bin/evmone-bench-master to bin/evmone-bench
Benchmark                            Time             CPU      Time Old      Time New       CPU Old       CPU New
-----------------------------------------------------------------------------------------------------------------
sha1_shifts/empty                 -0.0881         -0.0881            63            58            63            58
sha1_shifts/1351                  -0.0715         -0.0715          1205          1119          1205          1119
sha1_shifts/2737                  -0.0845         -0.0845          2375          2175          2375          2175
sha1_shifts/5311                  -0.0803         -0.0803          4614          4244          4614          4244
sha1_shifts/65536                 -0.0722         -0.0722         56199         52142         56198         52142
stop                              +0.0156         +0.0156             0             0             0             0
blake2b_huff/empty                -0.0804         -0.0804            81            74            81            74
blake2b_huff/abc                  -0.0786         -0.0786            80            74            80            74
blake2b_huff/2805nulls            -0.0414         -0.0413           602           577           602           577
blake2b_huff/2805aa               -0.0317         -0.0317           598           579           598           579
blake2b_huff/5610nulls            -0.0335         -0.0335          1124          1086          1124          1086
blake2b_huff/8415nulls            -0.0332         -0.0332          1627          1573          1627          1573
blake2b_huff/65536nulls           -0.0250         -0.0250         12128         11824         12128         11824
sha1_divs/empty                   -0.0163         -0.0162           105           103           105           103
sha1_divs/1351                    -0.0260         -0.0260          2112          2057          2112          2057
sha1_divs/2737                    -0.0277         -0.0276          4135          4020          4135          4020
sha1_divs/5311                    -0.0192         -0.0191          8029          7875          8029          7875
sha1_divs/65536                   -0.0214         -0.0213         97719         95631         97714         95632
blake2b_shifts/empty              +0.0000         +0.0000             0             0             0             0
blake2b_shifts/2805nulls          -0.0319         -0.0319          7585          7343          7585          7343
blake2b_shifts/5610nulls          -0.0277         -0.0276         15070         14653         15069         14653
blake2b_shifts/8415nulls          -0.0326         -0.0326         22651         21911         22650         21911
blake2b_shifts/65536nulls         -0.0338         -0.0338        177036        171051        177030        171051

@codecov-io
Copy link

codecov-io commented Jun 24, 2019

Codecov Report

Merging #74 into master will decrease coverage by 0.16%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
- Coverage   99.43%   99.27%   -0.17%     
==========================================
  Files          16       16              
  Lines        1778     1791      +13     
  Branches      161      160       -1     
==========================================
+ Hits         1768     1778      +10     
- Misses          1        4       +3     
  Partials        9        9

@chfast chfast merged commit 0d6329d into master Jun 24, 2019
@chfast chfast deleted the beginblock_instr branch June 24, 2019 10:44
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.

2 participants