diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 1aefc810bd..97234368ee 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -514,6 +514,17 @@ func BenchmarkSimpleLoop(b *testing.B) { byte(vm.JUMP), } + loopingCode2 := []byte{ + byte(vm.JUMPDEST), // [ count ] + // push args for the call + byte(vm.PUSH4), 1, 2, 3, 4, + byte(vm.PUSH5), 1, 2, 3, 4, 5, + + byte(vm.POP), byte(vm.POP), + byte(vm.PUSH6), 0, 0, 0, 0, 0, 0, // jumpdestination + byte(vm.JUMP), + } + callRevertingContractWithInput := []byte{ byte(vm.JUMPDEST), // // push args for the call @@ -540,6 +551,7 @@ func BenchmarkSimpleLoop(b *testing.B) { benchmarkNonModifyingCode(100000000, staticCallIdentity, "staticcall-identity-100M", "", b) benchmarkNonModifyingCode(100000000, callIdentity, "call-identity-100M", "", b) benchmarkNonModifyingCode(100000000, loopingCode, "loop-100M", "", b) + benchmarkNonModifyingCode(100000000, loopingCode2, "loop2-100M", "", b) benchmarkNonModifyingCode(100000000, callInexistant, "call-nonexist-100M", "", b) benchmarkNonModifyingCode(100000000, callEOA, "call-EOA-100M", "", b) benchmarkNonModifyingCode(100000000, callRevertingContractWithInput, "call-reverting-100M", "", b)