mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update gas costs.
This commit is contained in:
parent
1304080a77
commit
4b0cd6cc8c
@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(string_storage)
|
||||
if (CommonOptions::get().useABIEncoderV1)
|
||||
CHECK_DEPLOY_GAS(133045, 129731, evmVersion);
|
||||
else
|
||||
CHECK_DEPLOY_GAS(144679, 121229, evmVersion);
|
||||
CHECK_DEPLOY_GAS(144999, 121229, evmVersion);
|
||||
}
|
||||
// This is only correct on >=Constantinople.
|
||||
else if (!CommonOptions::get().useABIEncoderV1)
|
||||
@ -117,9 +117,9 @@ BOOST_AUTO_TEST_CASE(string_storage)
|
||||
else
|
||||
{
|
||||
if (evmVersion < EVMVersion::istanbul())
|
||||
CHECK_DEPLOY_GAS(138693, 123969, evmVersion);
|
||||
CHECK_DEPLOY_GAS(139013, 123969, evmVersion);
|
||||
else
|
||||
CHECK_DEPLOY_GAS(123301, 110969, evmVersion);
|
||||
CHECK_DEPLOY_GAS(123361, 110969, evmVersion);
|
||||
}
|
||||
}
|
||||
else if (evmVersion < EVMVersion::istanbul())
|
||||
|
@ -17,9 +17,9 @@ contract C {
|
||||
// optimize-yul: true
|
||||
// ----
|
||||
// creation:
|
||||
// codeDepositCost: 680600
|
||||
// codeDepositCost: 681000
|
||||
// executionCost: 715
|
||||
// totalCost: 681315
|
||||
// totalCost: 681715
|
||||
// external:
|
||||
// a(): 2285
|
||||
// b(uint256): 4652
|
||||
|
@ -32,6 +32,6 @@ contract C is B {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 77
|
||||
// gas irOptimized: 120952
|
||||
// gas irOptimized: 121752
|
||||
// gas legacy: 155249
|
||||
// gas legacyOptimized: 111743
|
||||
|
@ -17,7 +17,7 @@ contract c {
|
||||
// ----
|
||||
// setData1(uint256,uint256,uint256): 10, 5, 4 ->
|
||||
// copyStorageStorage() ->
|
||||
// gas irOptimized: 111487
|
||||
// gas irOptimized: 111488
|
||||
// gas legacy: 109278
|
||||
// gas legacyOptimized: 109268
|
||||
// getData2(uint256): 5 -> 10, 4
|
||||
|
@ -46,6 +46,6 @@ contract Test {
|
||||
// test1() -> 3
|
||||
// test2() -> 6
|
||||
// test3() -> 24
|
||||
// gas irOptimized: 133742
|
||||
// gas irOptimized: 133753
|
||||
// gas legacy: 134295
|
||||
// gas legacyOptimized: 133383
|
||||
|
@ -23,4 +23,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1
|
||||
// gas irOptimized: 330384
|
||||
// gas irOptimized: 330385
|
||||
|
@ -50,7 +50,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 1770739
|
||||
// gas irOptimized: 1769431
|
||||
// gas legacy: 2356230
|
||||
// gas legacyOptimized: 1746528
|
||||
// div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
|
||||
@ -58,7 +58,7 @@ contract test {
|
||||
// gas legacy: 22497
|
||||
// gas legacyOptimized: 22010
|
||||
// exp(uint256): 3141592653589793238 -> 23140692632779268978
|
||||
// gas irOptimized: 24245
|
||||
// gas irOptimized: 24234
|
||||
// gas legacy: 25104
|
||||
// gas legacyOptimized: 24258
|
||||
// exp2(uint256): 3141592653589793238 -> 8824977827076287620
|
||||
|
@ -35,10 +35,10 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 526745
|
||||
// gas irOptimized: 528041
|
||||
// gas legacy: 733634
|
||||
// gas legacyOptimized: 478742
|
||||
// gas legacyOptimized: 479606
|
||||
// prb_pi() -> 3141592656369545286
|
||||
// gas irOptimized: 62867
|
||||
// gas irOptimized: 63027
|
||||
// gas legacy: 98903
|
||||
// gas legacyOptimized: 75735
|
||||
|
@ -51,11 +51,11 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 776466
|
||||
// gas irOptimized: 778254
|
||||
// gas legacy: 1188228
|
||||
// gas legacyOptimized: 749336
|
||||
// gas legacyOptimized: 750416
|
||||
// toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0
|
||||
// gas irOptimized: 22723
|
||||
// gas irOptimized: 22734
|
||||
// gas legacy: 23190
|
||||
// gas legacyOptimized: 22508
|
||||
// roundtrip(string): 0x20, 11, "hello world" -> 0x20, 11, "hello world"
|
||||
@ -67,7 +67,7 @@ contract test {
|
||||
// gas legacy: 25716
|
||||
// gas legacyOptimized: 24115
|
||||
// multiconcat(string,uint256): 0x40, 3, 11, "hello world" -> 0x20, 0x58, 0x68656c6c6f20776f726c6468656c6c6f20776f726c6468656c6c6f20776f726c, 0x6468656c6c6f20776f726c6468656c6c6f20776f726c6468656c6c6f20776f72, 49027192869463622675296414541903001712009715982962058146354235762728281047040 # concatenating 3 times #
|
||||
// gas irOptimized: 28962
|
||||
// gas irOptimized: 28958
|
||||
// gas legacy: 31621
|
||||
// gas legacyOptimized: 27914
|
||||
// benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020
|
||||
|
@ -28,6 +28,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// t() -> 9
|
||||
// gas irOptimized: 99004
|
||||
// gas irOptimized: 99010
|
||||
// gas legacy: 159083
|
||||
// gas legacyOptimized: 108916
|
||||
|
@ -33,4 +33,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 0, 0, 0
|
||||
// gas irOptimized: 117648
|
||||
// gas irOptimized: 117388
|
||||
|
@ -98,7 +98,7 @@ contract ERC20 {
|
||||
// ----
|
||||
// constructor()
|
||||
// ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14
|
||||
// gas irOptimized: 460447
|
||||
// gas irOptimized: 459547
|
||||
// gas legacy: 833310
|
||||
// gas legacyOptimized: 416135
|
||||
// totalSupply() -> 20
|
||||
@ -107,12 +107,12 @@ contract ERC20 {
|
||||
// gas legacyOptimized: 23368
|
||||
// transfer(address,uint256): 2, 5 -> true
|
||||
// ~ emit Transfer(address,address,uint256): #0x1212121212121212121212121212120000000012, #0x02, 0x05
|
||||
// gas irOptimized: 48514
|
||||
// gas irOptimized: 48503
|
||||
// gas legacy: 49317
|
||||
// gas legacyOptimized: 48491
|
||||
// decreaseAllowance(address,uint256): 2, 0 -> true
|
||||
// ~ emit Approval(address,address,uint256): #0x1212121212121212121212121212120000000012, #0x02, 0x00
|
||||
// gas irOptimized: 26316
|
||||
// gas irOptimized: 26327
|
||||
// gas legacy: 27012
|
||||
// gas legacyOptimized: 26275
|
||||
// decreaseAllowance(address,uint256): 2, 1 -> FAILURE, hex"4e487b71", 0x11
|
||||
@ -121,7 +121,7 @@ contract ERC20 {
|
||||
// gas legacyOptimized: 24056
|
||||
// transfer(address,uint256): 2, 14 -> true
|
||||
// ~ emit Transfer(address,address,uint256): #0x1212121212121212121212121212120000000012, #0x02, 0x0e
|
||||
// gas irOptimized: 28614
|
||||
// gas irOptimized: 28603
|
||||
// gas legacy: 29417
|
||||
// gas legacyOptimized: 28591
|
||||
// transfer(address,uint256): 2, 2 -> FAILURE, hex"4e487b71", 0x11
|
||||
|
Loading…
Reference in New Issue
Block a user