flow-go
flow-go copied to clipboard
Update Cadence version
Do not merge
This PR updates Cadence version that exposes the new storage API in the runtime environment.
FVM Benchstat comparison
This branch with compared with the base branch onflow:master commit 03634c1406e86a40860d5561bb067bb7799b6073
The command (for i in {1..N}; do go test ./fvm --bench . --tags relic -shuffle=on --benchmem --run ^$; done) was used.
Bench tests were run a total of 10 times on each branch.
Collapsed results for better readability
| old.txt | new.txt | |||
|---|---|---|---|---|
| time/op | delta | |||
| RuntimeTransaction/reference_tx-2 | 25.7ms ±17% | 24.1ms ± 1% | ~ | (p=0.075 n=10+10) |
| RuntimeTransaction/convert_int_to_string-2 | 26.1ms ± 5% | 25.9ms ± 1% | ~ | (p=0.436 n=9+9) |
| RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 28.2ms ± 5% | 29.7ms ±17% | ~ | (p=0.280 n=10+10) |
| RuntimeTransaction/get_signer_address-2 | 25.1ms ± 4% | 24.7ms ± 2% | ~ | (p=0.237 n=8+10) |
| RuntimeTransaction/get_public_account-2 | 28.3ms ± 4% | 28.4ms ±12% | ~ | (p=0.796 n=9+9) |
| RuntimeTransaction/get_account_and_get_balance-2 | 504ms ± 3% | 502ms ± 2% | ~ | (p=0.277 n=9+8) |
| RuntimeTransaction/get_account_and_get_available_balance-2 | 410ms ± 2% | 407ms ± 2% | ~ | (p=0.353 n=10+10) |
| RuntimeTransaction/get_account_and_get_storage_used-2 | 32.4ms ± 3% | 32.2ms ± 2% | ~ | (p=0.165 n=10+10) |
| RuntimeTransaction/get_account_and_get_storage_capacity-2 | 379ms ± 3% | 378ms ± 3% | ~ | (p=1.000 n=10+10) |
| RuntimeTransaction/get_signer_vault-2 | 33.0ms ± 2% | 32.7ms ± 1% | ~ | (p=0.077 n=9+9) |
| RuntimeTransaction/get_signer_receiver-2 | 44.2ms ± 4% | 43.6ms ± 2% | ~ | (p=0.218 n=10+10) |
| RuntimeTransaction/transfer_tokens-2 | 191ms ± 1% | 190ms ± 2% | ~ | (p=0.156 n=9+10) |
| RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 32.5ms ± 3% | 32.0ms ± 1% | ~ | (p=0.133 n=10+9) |
| RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 72.3ms ± 4% | 72.0ms ± 2% | ~ | (p=0.353 n=10+10) |
| RuntimeTransaction/create_new_account-2 | 956ms ± 2% | 953ms ± 2% | ~ | (p=0.315 n=8+10) |
| RuntimeTransaction/call_empty_contract_function-2 | 28.1ms ± 4% | 27.7ms ± 2% | ~ | (p=0.063 n=10+10) |
| RuntimeTransaction/emit_event-2 | 42.8ms ± 3% | 42.5ms ± 2% | ~ | (p=0.190 n=10+10) |
| RuntimeTransaction/borrow_array_from_storage-2 | 118ms ± 4% | 117ms ± 1% | ~ | (p=0.315 n=10+10) |
| RuntimeTransaction/copy_array_from_storage-2 | 116ms ± 5% | 115ms ± 2% | ~ | (p=0.481 n=10+10) |
| RuntimeNFTBatchTransfer-2 | 108ms ± 2% | 108ms ± 2% | ~ | (p=0.905 n=10+9) |
| computation | delta | |||
| RuntimeTransaction/reference_tx-2 | 202 ± 0% | 202 ± 0% | ~ | (all equal) |
| RuntimeTransaction/convert_int_to_string-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
| RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 502 ± 0% | 502 ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_signer_address-2 | 302 ± 0% | 302 ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_public_account-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_account_and_get_balance-2 | 1.00k ± 0% | 1.00k ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_account_and_get_available_balance-2 | 2.60k ± 0% | 2.60k ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_account_and_get_storage_used-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_account_and_get_storage_capacity-2 | 1.30k ± 0% | 1.30k ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_signer_vault-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_signer_receiver-2 | 602 ± 0% | 602 ± 0% | ~ | (all equal) |
| RuntimeTransaction/transfer_tokens-2 | 3.50k ± 0% | 3.50k ± 0% | ~ | (all equal) |
| RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 602 ± 0% | 602 ± 0% | ~ | (all equal) |
| RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 602 ± 0% | 602 ± 0% | ~ | (all equal) |
| RuntimeTransaction/create_new_account-2 | 202 ± 0% | 202 ± 0% | ~ | (all equal) |
| RuntimeTransaction/call_empty_contract_function-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
| RuntimeTransaction/emit_event-2 | 602 ± 0% | 602 ± 0% | ~ | (all equal) |
| RuntimeTransaction/borrow_array_from_storage-2 | 2.60k ± 0% | 2.60k ± 0% | ~ | (all equal) |
| RuntimeTransaction/copy_array_from_storage-2 | 2.60k ± 0% | 2.60k ± 0% | ~ | (all equal) |
| interactions | delta | |||
| RuntimeTransaction/reference_tx-2 | 47.7k ± 0% | 47.7k ± 0% | ~ | (all equal) |
| RuntimeTransaction/convert_int_to_string-2 | 47.7k ± 0% | 47.7k ± 0% | ~ | (all equal) |
| RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 47.7k ± 0% | 47.7k ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_signer_address-2 | 47.7k ± 0% | 47.7k ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_public_account-2 | 47.7k ± 0% | 47.7k ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_account_and_get_balance-2 | 16.8M ± 0% | 16.8M ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_account_and_get_available_balance-2 | 5.28M ± 0% | 5.28M ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_account_and_get_storage_used-2 | 51.3k ± 0% | 51.3k ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_account_and_get_storage_capacity-2 | 5.28M ± 0% | 5.28M ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_signer_vault-2 | 48.0k ± 0% | 48.0k ± 0% | ~ | (all equal) |
| RuntimeTransaction/get_signer_receiver-2 | 48.3k ± 0% | 48.3k ± 0% | ~ | (all equal) |
| RuntimeTransaction/transfer_tokens-2 | 49.1k ± 0% | 49.1k ± 0% | ~ | (all equal) |
| RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 48.1k ± 0% | 48.1k ± 0% | ~ | (all equal) |
| RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 53.0k ± 0% | 53.0k ± 0% | ~ | (all equal) |
| RuntimeTransaction/create_new_account-2 | 8.53M ± 0% | 8.53M ± 0% | ~ | (all equal) |
| RuntimeTransaction/call_empty_contract_function-2 | 47.9k ± 0% | 47.9k ± 0% | ~ | (all equal) |
| RuntimeTransaction/emit_event-2 | 47.9k ± 0% | 47.9k ± 0% | ~ | (all equal) |
| RuntimeTransaction/borrow_array_from_storage-2 | 53.1k ± 0% | 53.1k ± 0% | ~ | (all equal) |
| RuntimeTransaction/copy_array_from_storage-2 | 53.1k ± 0% | 53.1k ± 0% | ~ | (all equal) |
| alloc/op | delta | |||
| RuntimeTransaction/get_account_and_get_available_balance-2 | 145MB ± 0% | 146MB ± 0% | +0.02% | (p=0.019 n=10+7) |
| RuntimeTransaction/reference_tx-2 | 7.63MB ± 1% | 7.61MB ± 0% | ~ | (p=0.165 n=10+10) |
| RuntimeTransaction/convert_int_to_string-2 | 8.08MB ± 0% | 8.08MB ± 1% | ~ | (p=0.968 n=10+9) |
| RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 8.64MB ± 0% | 8.67MB ± 1% | ~ | (p=0.190 n=10+10) |
| RuntimeTransaction/get_signer_address-2 | 7.85MB ± 1% | 7.84MB ± 0% | ~ | (p=0.156 n=10+9) |
| RuntimeTransaction/get_public_account-2 | 9.30MB ± 1% | 9.28MB ± 0% | ~ | (p=0.579 n=10+10) |
| RuntimeTransaction/get_account_and_get_balance-2 | 195MB ± 0% | 195MB ± 0% | ~ | (p=0.853 n=10+10) |
| RuntimeTransaction/get_account_and_get_storage_used-2 | 10.5MB ± 1% | 10.5MB ± 1% | ~ | (p=0.481 n=10+10) |
| RuntimeTransaction/get_account_and_get_storage_capacity-2 | 140MB ± 0% | 140MB ± 0% | ~ | (p=0.190 n=10+10) |
| RuntimeTransaction/get_signer_vault-2 | 9.84MB ± 1% | 9.86MB ± 1% | ~ | (p=0.579 n=10+10) |
| RuntimeTransaction/get_signer_receiver-2 | 13.6MB ± 0% | 13.6MB ± 1% | ~ | (p=0.353 n=10+10) |
| RuntimeTransaction/transfer_tokens-2 | 48.8MB ± 0% | 48.8MB ± 0% | ~ | (p=0.971 n=10+10) |
| RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 9.27MB ± 0% | 9.27MB ± 0% | ~ | (p=0.436 n=10+10) |
| RuntimeTransaction/create_new_account-2 | 217MB ± 0% | 217MB ± 0% | ~ | (p=0.133 n=9+10) |
| RuntimeTransaction/call_empty_contract_function-2 | 8.54MB ± 0% | 8.55MB ± 0% | ~ | (p=0.549 n=9+10) |
| RuntimeTransaction/emit_event-2 | 12.9MB ± 0% | 12.8MB ± 0% | ~ | (p=0.356 n=10+9) |
| RuntimeTransaction/borrow_array_from_storage-2 | 34.0MB ± 0% | 33.9MB ± 0% | ~ | (p=0.063 n=10+10) |
| RuntimeTransaction/copy_array_from_storage-2 | 45.1MB ± 0% | 45.1MB ± 0% | ~ | (p=0.661 n=10+9) |
| RuntimeNFTBatchTransfer-2 | 24.5MB ± 0% | 24.5MB ± 0% | ~ | (p=0.696 n=8+10) |
| RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 23.8MB ± 0% | 23.8MB ± 0% | −0.13% | (p=0.019 n=9+9) |
| allocs/op | delta | |||
| RuntimeTransaction/get_signer_receiver-2 | 263k ± 0% | 263k ± 0% | +0.01% | (p=0.015 n=10+8) |
| RuntimeTransaction/reference_tx-2 | 122k ± 0% | 122k ± 0% | ~ | (p=0.695 n=10+10) |
| RuntimeTransaction/convert_int_to_string-2 | 137k ± 0% | 137k ± 0% | ~ | (p=0.053 n=10+10) |
| RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 151k ± 0% | 151k ± 0% | ~ | (p=0.253 n=10+10) |
| RuntimeTransaction/get_signer_address-2 | 128k ± 0% | 128k ± 0% | ~ | (p=0.108 n=10+10) |
| RuntimeTransaction/get_public_account-2 | 159k ± 0% | 159k ± 0% | ~ | (p=0.986 n=10+10) |
| RuntimeTransaction/get_account_and_get_balance-2 | 3.17M ± 0% | 3.17M ± 0% | ~ | (p=0.853 n=10+10) |
| RuntimeTransaction/get_account_and_get_available_balance-2 | 2.55M ± 0% | 2.55M ± 0% | ~ | (p=0.163 n=9+10) |
| RuntimeTransaction/get_account_and_get_storage_used-2 | 181k ± 0% | 181k ± 0% | ~ | (p=0.539 n=10+10) |
| RuntimeTransaction/get_account_and_get_storage_capacity-2 | 2.39M ± 0% | 2.39M ± 0% | ~ | (p=0.867 n=7+10) |
| RuntimeTransaction/get_signer_vault-2 | 174k ± 0% | 174k ± 0% | ~ | (p=0.589 n=10+10) |
| RuntimeTransaction/transfer_tokens-2 | 1.03M ± 0% | 1.03M ± 0% | ~ | (p=0.579 n=10+10) |
| RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 173k ± 0% | 173k ± 0% | ~ | (p=0.983 n=10+9) |
| RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 269k ± 0% | 269k ± 0% | ~ | (p=0.410 n=10+9) |
| RuntimeTransaction/create_new_account-2 | 3.59M ± 0% | 3.59M ± 0% | ~ | (p=0.796 n=10+10) |
| RuntimeTransaction/call_empty_contract_function-2 | 140k ± 0% | 140k ± 0% | ~ | (p=1.000 n=10+8) |
| RuntimeTransaction/emit_event-2 | 186k ± 0% | 186k ± 0% | ~ | (p=0.725 n=10+10) |
| RuntimeTransaction/borrow_array_from_storage-2 | 412k ± 0% | 412k ± 0% | ~ | (p=0.869 n=10+10) |
| RuntimeTransaction/copy_array_from_storage-2 | 368k ± 0% | 368k ± 0% | ~ | (p=0.563 n=9+10) |
| RuntimeNFTBatchTransfer-2 | 332k ± 0% | 333k ± 0% | ~ | (p=0.530 n=8+10) |
@sideninja good to close?