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

Ft/fix max high #47

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

ftheirs
Copy link
Collaborator

@ftheirs ftheirs commented Oct 15, 2024

MAX_HIGH and MAX_LOW constants were not found in split_felt hint. The path that was used to search for the variables seems to be wrong yet they are not on the constant hash map.
So, this PR includes a fix for that and also a default value that matches cairo code

const MAX_HIGH = (-1) / 2 ** 128;
const MAX_LOW = 0;

Copy link

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.346 ± 0.076 2.288 2.535 1.01 ± 0.03
head big_factorial 2.331 ± 0.028 2.296 2.373 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.248 ± 0.025 2.212 2.279 1.00
head big_fibonacci 2.256 ± 0.024 2.226 2.297 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.129 ± 0.081 7.982 8.208 1.00 ± 0.01
head blake2s_integration_benchmark 8.123 ± 0.089 7.975 8.254 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.384 ± 0.022 2.349 2.414 1.00
head compare_arrays_200000 2.399 ± 0.049 2.356 2.496 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.580 ± 0.012 1.569 1.608 1.00 ± 0.03
head dict_integration_benchmark 1.579 ± 0.040 1.559 1.690 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.308 ± 0.015 1.294 1.332 1.00
head field_arithmetic_get_square_benchmark 1.323 ± 0.016 1.306 1.360 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.253 ± 0.154 8.056 8.568 1.01 ± 0.02
head integration_builtins 8.191 ± 0.112 8.071 8.341 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.482 ± 0.231 8.329 9.105 1.00
head keccak_integration_benchmark 8.514 ± 0.242 8.292 9.167 1.00 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.378 ± 0.015 2.356 2.400 1.00
head linear_search 2.379 ± 0.028 2.344 2.439 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.665 ± 0.016 1.641 1.695 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.654 ± 0.018 1.631 1.685 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.619 ± 0.022 1.598 1.672 1.02 ± 0.01
head math_integration_benchmark 1.583 ± 0.008 1.575 1.598 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.336 ± 0.013 1.322 1.367 1.00 ± 0.01
head memory_integration_benchmark 1.331 ± 0.010 1.317 1.347 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.733 ± 0.025 1.707 1.782 1.00 ± 0.02
head operations_with_data_structures_benchmarks 1.726 ± 0.025 1.698 1.780 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 563.5 ± 7.1 557.3 580.3 1.00 ± 0.02
head pedersen 562.7 ± 7.2 556.5 576.2 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 666.0 ± 8.5 657.3 686.2 1.00
head poseidon_integration_benchmark 672.1 ± 12.9 655.5 693.2 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.960 ± 0.030 1.933 2.019 1.00 ± 0.02
head secp_integration_benchmark 1.954 ± 0.026 1.926 2.016 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 674.0 ± 10.2 664.8 695.5 1.00
head set_integration_benchmark 692.2 ± 6.7 684.4 703.9 1.03 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.612 ± 0.112 4.514 4.855 1.01 ± 0.03
head uint256_integration_benchmark 4.560 ± 0.067 4.495 4.707 1.00

Copy link
Collaborator

@HermanObst HermanObst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don like it too much. But lets go

@HermanObst HermanObst merged commit 01ea1e0 into notlesh/segment-arena-relocation-fix Oct 17, 2024
32 of 69 checks passed
@HermanObst HermanObst deleted the ft/fix_max_high branch October 17, 2024 19:47
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