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

Adjust WASM execution costing #1991

Merged
merged 4 commits into from
Oct 31, 2024
Merged

Conversation

lrubasze
Copy link
Contributor

@lrubasze lrubasze commented Oct 31, 2024

Summary

This is to make sure below benchmarks are more or less balanced.

Test Base PR %
costing::scrypto_malloc 452.9±0.43ms 498.3±0.56ms +10.02%
costing::scrypto_sbor_decode 478.7±2.26ms 533.2±2.06ms +11.39%
costing::scrypto_sha256 354.9±0.68ms 442.4±0.94ms +24.65%
costing::spin_loop_v1 463.7±0.97ms 433.6±4.55ms -6.49%
costing::spin_loop_v2 941.7±3.20ms 543.2±1.42ms -42.32%

Copy link

github-actions bot commented Oct 31, 2024

Docker tags
docker.io/radixdlt/private-scrypto-builder:c3c44e14c1

Copy link

github-actions bot commented Oct 31, 2024

Benchmark for c3c44e1

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 44.3±0.08ms 44.4±0.11ms +0.23%
costing::decode_encoded_i8_array_to_manifest_raw_value 19.4±0.02ms 19.4±0.02ms 0.00%
costing::decode_encoded_i8_array_to_manifest_value 42.8±0.10ms 42.3±0.07ms -1.17%
costing::decode_encoded_tuple_array_to_manifest_raw_value 72.1±0.10ms 72.1±0.09ms 0.00%
costing::decode_encoded_tuple_array_to_manifest_value 120.9±1.27ms 99.1±0.19ms -18.03%
costing::decode_encoded_u8_array_to_manifest_raw_value 26.3±0.07µs 25.5±0.06µs -3.04%
costing::decode_encoded_u8_array_to_manifest_value 42.7±0.06ms 42.3±0.06ms -0.94%
costing::decode_rpd_to_manifest_raw_value 14.6±0.05µs 14.5±0.03µs -0.68%
costing::decode_rpd_to_manifest_value 11.2±0.02µs 10.7±0.06µs -4.46%
costing::deserialize_wasm 1230.0±5.95µs 1241.7±3.84µs +0.95%
costing::execute_transaction_creating_big_vec_substates 683.9±7.09ms 696.7±11.45ms +1.87%
costing::execute_transaction_reading_big_vec_substates 580.7±1.86ms 581.0±1.46ms +0.05%
costing::instantiate_flash_loan 1233.2±3042.59µs 890.1±625.63µs -27.82%
costing::instantiate_radiswap 1054.4±1261.29µs 1081.1±1331.58µs +2.53%
costing::scrypto_malloc 459.7±0.75ms 489.1±2.23ms +6.40%
costing::scrypto_sbor_decode 462.4±1.17ms 527.5±1.92ms +14.08%
costing::scrypto_sha256 348.4±0.62ms 437.1±1.82ms +25.46%
costing::spin_loop_v1 470.4±1.66ms 440.5±24.65ms -6.36%
costing::spin_loop_v2 959.9±19.56ms 538.9±0.76ms -43.86%
costing::validate_sbor_payload 29.4±0.05µs 30.0±0.06µs +2.04%
costing::validate_sbor_payload_bytes 242.8±0.53ns 256.1±1.45ns +5.48%
costing::validate_secp256k1 76.6±0.06µs 76.6±0.07µs 0.00%
costing::validate_wasm 33.9±0.04ms 33.7±0.03ms -0.59%
decimal::add/0 8.4±0.00ns 8.4±0.00ns 0.00%
decimal::add/rust-native 9.8±0.00ns 9.8±0.00ns 0.00%
decimal::add/wasmi 218.7±0.32ns 217.1±0.25ns -0.73%
decimal::add/wasmi-call-native 2.1±0.00µs 2.1±0.00µs 0.00%
decimal::div/0 167.5±0.23ns 169.4±0.25ns +1.13%
decimal::from_string/0 156.6±0.11ns 156.6±0.23ns 0.00%
decimal::mul/0 127.7±0.13ns 128.7±0.14ns +0.78%
decimal::mul/rust-native 127.8±0.02ns 127.9±0.05ns +0.08%
decimal::mul/wasmi 11.6±0.10µs 11.3±0.12µs -2.59%
decimal::mul/wasmi-call-native 2.2±0.02µs 2.2±0.00µs 0.00%
decimal::pow/0 595.5±0.64ns 596.5±0.19ns +0.17%
decimal::pow/rust-native 591.0±0.49ns 606.2±2.46ns +2.57%
decimal::pow/wasmi 59.5±0.15µs 59.0±1.16µs -0.84%
decimal::pow/wasmi-call-native 3.2±0.01µs 3.2±0.00µs 0.00%
decimal::root/0 8.1±0.01µs 8.1±0.01µs 0.00%
decimal::sub/0 8.3±0.01ns 8.3±0.01ns 0.00%
decimal::to_string/0 437.8±0.91ns 442.2±0.36ns +1.01%
large_transaction_processing::prepare 2.6±0.00ms 2.6±0.00ms 0.00%
large_transaction_processing::prepare_and_decompile 6.2±0.03ms 6.1±0.02ms -1.61%
large_transaction_processing::prepare_and_decompile_and_recompile 31.0±1.24ms 31.4±0.29ms +1.29%
metadata_validation::validate_urls 5.2±0.05µs 5.4±0.05µs +3.85%
precise_decimal::add/0 8.7±0.10ns 9.0±0.01ns +3.45%
precise_decimal::add/rust-native 10.7±0.01ns 10.7±0.02ns 0.00%
precise_decimal::add/wasmi 273.0±0.89ns 277.6±0.36ns +1.68%
precise_decimal::add/wasmi-call-native 2.8±0.00µs 2.8±0.00µs 0.00%
precise_decimal::div/0 327.6±3.26ns 330.4±2.92ns +0.85%
precise_decimal::from_string/0 201.2±0.26ns 201.2±0.13ns 0.00%
precise_decimal::mul/0 357.3±2.92ns 372.7±0.57ns +4.31%
precise_decimal::mul/rust-native 285.2±0.37ns 310.6±1.61ns +8.91%
precise_decimal::mul/wasmi 34.8±0.21µs 33.9±0.14µs -2.59%
precise_decimal::mul/wasmi-call-native 3.1±0.00µs 3.1±0.02µs 0.00%
precise_decimal::pow/0 1804.5±5.76ns 1809.6±7.60ns +0.28%
precise_decimal::pow/rust-native 1417.4±3.21ns 1394.7±2.69ns -1.60%
precise_decimal::pow/wasmi 167.2±3.63µs 163.1±1.18µs -2.45%
precise_decimal::pow/wasmi-call-native 5.4±0.01µs 5.4±0.01µs 0.00%
precise_decimal::root/0 57.2±0.10µs 58.7±0.04µs +2.62%
precise_decimal::sub/0 8.9±0.01ns 9.2±0.11ns +3.37%
precise_decimal::to_string/0 694.5±2.63ns 695.0±1.67ns +0.07%
schema::validate_payload 379.3±0.42µs 381.6±0.79µs +0.61%
transaction::radiswap 4.7±0.03ms 4.8±0.02ms +2.13%
transaction::transfer 1807.4±4.11µs 1861.4±10.11µs +2.99%
transaction_validation::validate_manifest 43.1±0.04µs 43.3±1.31µs +0.46%
transaction_validation::verify_bls_2KB 1005.5±12.42µs 1071.9±21.11µs +6.60%
transaction_validation::verify_bls_32B 1004.8±10.35µs 1000.7±9.07µs -0.41%
transaction_validation::verify_ecdsa 74.5±0.19µs 74.7±0.09µs +0.27%
transaction_validation::verify_ed25519 42.4±0.11µs 45.0±0.11µs +6.13%

@lrubasze lrubasze marked this pull request as ready for review October 31, 2024 09:36
@lrubasze lrubasze force-pushed the tweak/wasm-execution-costing branch from fa9576d to f7f4060 Compare October 31, 2024 09:48
@lrubasze lrubasze merged commit 9fa40db into develop Oct 31, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants