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

fix: oracle_data_len_all_source optimization #93

Merged
merged 2 commits into from
Nov 24, 2023
Merged

Conversation

JordyRo1
Copy link
Contributor

No description provided.

Copy link

Output from Compare Snapshot:

****IMPROVEMENTS****
pragma::tests::test_oracle::get_data_for_sources 27712596 --> 27630636 -0.30 %
pragma::tests::test_oracle::get_data_median 38304826 --> 38212826 -0.24 %
pragma::tests::test_oracle::get_data_median_for_sources 24678346 --> 24598896 -0.32 %
pragma::tests::test_oracle::get_data_median_for_sources_should_fail_if_wrong_sources 22603966 --> 22524516 -0.35 %
pragma::tests::test_oracle::test_add_currency_should_fail_if_currency_id_null 22001126 --> 21924186 -0.35 %
pragma::tests::test_oracle::test_add_pair_should_panic_if_base_currency_do_not_corresponds 22146796 --> 22069856 -0.35 %
pragma::tests::test_oracle::test_add_pair_should_panic_if_quote_currency_do_not_corresponds 22171796 --> 22094856 -0.35 %
pragma::tests::test_oracle::test_data_entry 24153596 --> 24076656 -0.32 %
pragma::tests::test_oracle::test_data_entry_should_fail_if_not_found 21886196 --> 21809256 -0.35 %
pragma::tests::test_oracle::test_data_entry_should_fail_if_not_found_2 21886196 --> 21809256 -0.35 %
pragma::tests::test_oracle::test_data_entry_should_fail_if_not_found_3 21886196 --> 21809256 -0.35 %
pragma::tests::test_oracle::test_data_median_multi_should_fail_if_no_expiration_time_associated 22581166 --> 22501716 -0.35 %
pragma::tests::test_oracle::test_data_median_multi_should_fail_if_wrong_data_types 23331526 --> 23252076 -0.34 %
pragma::tests::test_oracle::test_data_median_multi_should_fail_if_wrong_sources 23349936 --> 23270486 -0.34 %
pragma::tests::test_oracle::test_get_admin_address 21770516 --> 21693576 -0.35 %
pragma::tests::test_oracle::test_get_all_publishers 24962908 --> 24876588 -0.35 %
pragma::tests::test_oracle::test_get_all_sources 22300826 --> 22223886 -0.35 %
pragma::tests::test_oracle::test_get_data 45547846 --> 45448316 -0.22 %
pragma::tests::test_oracle::test_get_data_entry_for_publishers 35842294 --> 35727834 -0.32 %
pragma::tests::test_oracle::test_get_data_median_multi 34664266 --> 34572266 -0.27 %
pragma::tests::test_oracle::test_get_data_with_USD_hop_should_fail_if_wrong_id 23486846 --> 23404886 -0.35 %
pragma::tests::test_oracle::test_get_data_with_usd_hop 34370136 --> 34283156 -0.25 %
pragma::tests::test_oracle::test_get_data_with_usd_hop_diff 26799686 --> 26717726 -0.31 %
pragma::tests::test_oracle::test_get_decimals 23187206 --> 23110266 -0.33 %
pragma::tests::test_oracle::test_get_decimals_should_fail_if_not_found 21993286 --> 21916346 -0.35 %
pragma::tests::test_oracle::test_get_decimals_should_fail_if_not_found_2 21993286 --> 21916346 -0.35 %
pragma::tests::test_oracle::test_get_last_checkpoint_before 29783016 --> 29701056 -0.28 %
pragma::tests::test_oracle::test_get_last_checkpoint_before_should_fail_if_timestamp_too_old 29298346 --> 29216386 -0.28 %
pragma::tests::test_oracle::test_get_last_checkpoint_before_should_fail_if_wrong_data_type 29298346 --> 29216386 -0.28 %
pragma::tests::test_oracle::test_max_publish_multiple_entries 56223908 --> 55861188 -0.65 %
pragma::tests::test_oracle::test_multiple_publishers_price 70913300 --> 70701210 -0.30 %
pragma::tests::test_oracle::test_publish_multiple_entries 33346860 --> 33209240 -0.41 %
pragma::tests::test_oracle::test_remove_source 27297880 --> 27199670 -0.36 %
pragma::tests::test_oracle::test_set_checkpoint 29606836 --> 29524876 -0.28 %
pragma::tests::test_oracle::test_set_checkpoint_should_fail_if_wrong_data_type 22627906 --> 22548456 -0.35 %
pragma::tests::test_oracle::test_transfer_ownership 22140616 --> 22063676 -0.35 %
pragma::tests::test_randomness::test_admin_address 5654452 --> 5650072 -0.08 %
pragma::tests::test_randomness::test_cancel_random_request_should_fail_if_fulflled 10696252 --> 10689362 -0.06 %
pragma::tests::test_randomness::test_fetch_multiple_out_of_gas_id 13373042 --> 13363642 -0.07 %
pragma::tests::test_randomness::test_out_of_gas_refund_check 10272992 --> 10266102 -0.07 %
pragma::tests::test_randomness::test_randomness 11123592 --> 11116702 -0.06 %
pragma::tests::test_randomness::test_randomness_cancellation 10895722 --> 10888832 -0.06 %
pragma::tests::test_randomness::test_randomness_id_incrementation 13435572 --> 13426172 -0.07 %
pragma::tests::test_randomness::test_refund_fails_if_id_not_valid_id 5580002 --> 5575622 -0.08 %
pragma::tests::test_randomness::test_refund_fails_if_no_due_amount 9109952 --> 9103062 -0.08 %
pragma::tests::test_randomness::test_submit_random_should_fail_if_request_cancelled 10340922 --> 10334032 -0.07 %
pragma::tests::test_randomness::test_withdraw_funds 12391102 --> 12384212 -0.06 %
pragma::tests::test_summary_stats::test_set_future_checkpoint 68495938 --> 68359538 -0.20 %
pragma::tests::test_summary_stats::test_summary_stats_mean_mean 64924752 --> 64848372 -0.12 %
pragma::tests::test_summary_stats::test_summary_stats_mean_median 64924752 --> 64848372 -0.12 %
pragma::tests::test_yield_curve::test_yield_curve_computation 23499492 --> 23470702 -0.12 %
pragma::tests::test_yield_curve::test_yield_curve_empty 7252210 --> 7249700 -0.03 %


****WORSENED****
None


Overall gas change: performance improvement, gas consumption-0.27 %

1 similar comment
Copy link

Output from Compare Snapshot:

****IMPROVEMENTS****
pragma::tests::test_oracle::get_data_for_sources 27712596 --> 27630636 -0.30 %
pragma::tests::test_oracle::get_data_median 38304826 --> 38212826 -0.24 %
pragma::tests::test_oracle::get_data_median_for_sources 24678346 --> 24598896 -0.32 %
pragma::tests::test_oracle::get_data_median_for_sources_should_fail_if_wrong_sources 22603966 --> 22524516 -0.35 %
pragma::tests::test_oracle::test_add_currency_should_fail_if_currency_id_null 22001126 --> 21924186 -0.35 %
pragma::tests::test_oracle::test_add_pair_should_panic_if_base_currency_do_not_corresponds 22146796 --> 22069856 -0.35 %
pragma::tests::test_oracle::test_add_pair_should_panic_if_quote_currency_do_not_corresponds 22171796 --> 22094856 -0.35 %
pragma::tests::test_oracle::test_data_entry 24153596 --> 24076656 -0.32 %
pragma::tests::test_oracle::test_data_entry_should_fail_if_not_found 21886196 --> 21809256 -0.35 %
pragma::tests::test_oracle::test_data_entry_should_fail_if_not_found_2 21886196 --> 21809256 -0.35 %
pragma::tests::test_oracle::test_data_entry_should_fail_if_not_found_3 21886196 --> 21809256 -0.35 %
pragma::tests::test_oracle::test_data_median_multi_should_fail_if_no_expiration_time_associated 22581166 --> 22501716 -0.35 %
pragma::tests::test_oracle::test_data_median_multi_should_fail_if_wrong_data_types 23331526 --> 23252076 -0.34 %
pragma::tests::test_oracle::test_data_median_multi_should_fail_if_wrong_sources 23349936 --> 23270486 -0.34 %
pragma::tests::test_oracle::test_get_admin_address 21770516 --> 21693576 -0.35 %
pragma::tests::test_oracle::test_get_all_publishers 24962908 --> 24876588 -0.35 %
pragma::tests::test_oracle::test_get_all_sources 22300826 --> 22223886 -0.35 %
pragma::tests::test_oracle::test_get_data 45547846 --> 45448316 -0.22 %
pragma::tests::test_oracle::test_get_data_entry_for_publishers 35842294 --> 35727834 -0.32 %
pragma::tests::test_oracle::test_get_data_median_multi 34664266 --> 34572266 -0.27 %
pragma::tests::test_oracle::test_get_data_with_USD_hop_should_fail_if_wrong_id 23486846 --> 23404886 -0.35 %
pragma::tests::test_oracle::test_get_data_with_usd_hop 34370136 --> 34283156 -0.25 %
pragma::tests::test_oracle::test_get_data_with_usd_hop_diff 26799686 --> 26717726 -0.31 %
pragma::tests::test_oracle::test_get_decimals 23187206 --> 23110266 -0.33 %
pragma::tests::test_oracle::test_get_decimals_should_fail_if_not_found 21993286 --> 21916346 -0.35 %
pragma::tests::test_oracle::test_get_decimals_should_fail_if_not_found_2 21993286 --> 21916346 -0.35 %
pragma::tests::test_oracle::test_get_last_checkpoint_before 29783016 --> 29701056 -0.28 %
pragma::tests::test_oracle::test_get_last_checkpoint_before_should_fail_if_timestamp_too_old 29298346 --> 29216386 -0.28 %
pragma::tests::test_oracle::test_get_last_checkpoint_before_should_fail_if_wrong_data_type 29298346 --> 29216386 -0.28 %
pragma::tests::test_oracle::test_max_publish_multiple_entries 56223908 --> 55861188 -0.65 %
pragma::tests::test_oracle::test_multiple_publishers_price 70913300 --> 70701210 -0.30 %
pragma::tests::test_oracle::test_publish_multiple_entries 33346860 --> 33209240 -0.41 %
pragma::tests::test_oracle::test_remove_source 27297880 --> 27199670 -0.36 %
pragma::tests::test_oracle::test_set_checkpoint 29606836 --> 29524876 -0.28 %
pragma::tests::test_oracle::test_set_checkpoint_should_fail_if_wrong_data_type 22627906 --> 22548456 -0.35 %
pragma::tests::test_oracle::test_transfer_ownership 22140616 --> 22063676 -0.35 %
pragma::tests::test_randomness::test_admin_address 5654452 --> 5650072 -0.08 %
pragma::tests::test_randomness::test_cancel_random_request_should_fail_if_fulflled 10696252 --> 10689362 -0.06 %
pragma::tests::test_randomness::test_fetch_multiple_out_of_gas_id 13373042 --> 13363642 -0.07 %
pragma::tests::test_randomness::test_out_of_gas_refund_check 10272992 --> 10266102 -0.07 %
pragma::tests::test_randomness::test_randomness 11123592 --> 11116702 -0.06 %
pragma::tests::test_randomness::test_randomness_cancellation 10895722 --> 10888832 -0.06 %
pragma::tests::test_randomness::test_randomness_id_incrementation 13435572 --> 13426172 -0.07 %
pragma::tests::test_randomness::test_refund_fails_if_id_not_valid_id 5580002 --> 5575622 -0.08 %
pragma::tests::test_randomness::test_refund_fails_if_no_due_amount 9109952 --> 9103062 -0.08 %
pragma::tests::test_randomness::test_submit_random_should_fail_if_request_cancelled 10340922 --> 10334032 -0.07 %
pragma::tests::test_randomness::test_withdraw_funds 12391102 --> 12384212 -0.06 %
pragma::tests::test_summary_stats::test_set_future_checkpoint 68495938 --> 68359538 -0.20 %
pragma::tests::test_summary_stats::test_summary_stats_mean_mean 64924752 --> 64848372 -0.12 %
pragma::tests::test_summary_stats::test_summary_stats_mean_median 64924752 --> 64848372 -0.12 %
pragma::tests::test_yield_curve::test_yield_curve_computation 23499492 --> 23470702 -0.12 %
pragma::tests::test_yield_curve::test_yield_curve_empty 7252210 --> 7249700 -0.03 %


****WORSENED****
None


Overall gas change: performance improvement, gas consumption-0.27 %

@EvolveArt EvolveArt marked this pull request as ready for review November 24, 2023 18:29
@EvolveArt EvolveArt merged commit 1c23d0c into main Nov 24, 2023
6 checks passed
@EvolveArt EvolveArt deleted the feat/gas-optimization branch November 24, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants