evmone icon indicating copy to clipboard operation
evmone copied to clipboard

Re-evaluate the block_analysis struct

Open chfast opened this issue 6 years ago • 0 comments

The https://github.com/ethereum/evmone/pull/144 introduces the block_analysis which keeps the basic block data as ints later compressed to smaller block_info. Therefore, the value clapping happens only once per block. However, the commit where it was introduced causes a slowdown (there might be other reasons for it, like the block vector growing).

Try using smaller types in block_analysis or inherit from block_info.

Comparing bin/evmone-bench-master to bin/evmone-bench
Benchmark                                          Time             CPU      Time Old      Time New       CPU Old       CPU New
-------------------------------------------------------------------------------------------------------------------------------
blake2b_huff/analysis                           +0.0165         +0.0165            35            35            35            35
blake2b_shifts/analysis                         +0.0153         +0.0153            19            19            19            19
sha1_divs/analysis                              +0.0470         +0.0470             4             4             4             4
sha1_shifts/analysis                            +0.0084         +0.0084             3             3             3             3
weierstrudel/analysis                           +0.0662         +0.0662            42            45            42            45
micro/loop_with_many_jumpdests/analysis         +0.0502         +0.0502           323           339           323           339

chfast avatar Sep 11 '19 07:09 chfast