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

Handle scientific notation in fn felt_from_number #1188

Merged
merged 8 commits into from
May 30, 2023

Conversation

pefontana
Copy link
Member

Handle scientific notation in fn felt_from_number

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

@pefontana pefontana marked this pull request as ready for review May 29, 2023 21:22
Copy link
Member

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

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

Looks good, left minor comment

src/serde/deserialize_program.rs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Merging #1188 (c12e7fd) into main (c06402c) will decrease coverage by 0.01%.
The diff coverage is 80.76%.

@@            Coverage Diff             @@
##             main    #1188      +/-   ##
==========================================
- Coverage   97.70%   97.69%   -0.01%     
==========================================
  Files          89       89              
  Lines       35943    35968      +25     
==========================================
+ Hits        35119    35140      +21     
- Misses        824      828       +4     
Impacted Files Coverage Δ
src/serde/deserialize_program.rs 97.11% <80.76%> (-0.31%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented May 29, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 12.946 ± 0.081 12.821 13.089 1.00 ± 0.01
head blake2s_integration_benchmark 12.940 ± 0.055 12.903 13.083 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 4.363 ± 0.049 4.322 4.494 1.00 ± 0.01
head compare_arrays_200000 4.350 ± 0.023 4.327 4.412 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.901 ± 0.033 2.867 2.968 1.00 ± 0.02
head dict_integration_benchmark 2.891 ± 0.037 2.854 2.956 1.00
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 4.529 ± 0.019 4.504 4.569 1.01 ± 0.01
head factorial_multirun 4.504 ± 0.022 4.485 4.561 1.00
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 3.951 ± 0.020 3.924 3.994 1.00 ± 0.01
head fibonacci_1000_multirun 3.935 ± 0.035 3.912 4.030 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 187.9 ± 1.3 186.3 190.2 1.00
head field_arithmetic_get_square_benchmark 188.8 ± 0.7 187.4 190.0 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 11.817 ± 0.137 11.631 12.022 1.01 ± 0.01
head integration_builtins 11.680 ± 0.073 11.597 11.841 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 13.202 ± 0.198 12.951 13.555 1.01 ± 0.02
head keccak_integration_benchmark 13.063 ± 0.213 12.907 13.609 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 4.374 ± 0.026 4.352 4.424 1.01 ± 0.01
head linear_search 4.346 ± 0.021 4.317 4.375 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 3.129 ± 0.037 3.107 3.229 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 3.104 ± 0.008 3.094 3.122 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.918 ± 0.034 2.897 3.012 1.01 ± 0.01
head math_integration_benchmark 2.898 ± 0.007 2.886 2.912 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.457 ± 0.014 2.444 2.491 1.00 ± 0.01
head memory_integration_benchmark 2.454 ± 0.013 2.435 2.477 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.877 ± 0.012 2.862 2.895 1.00 ± 0.01
head operations_with_data_structures_benchmarks 2.864 ± 0.011 2.850 2.888 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 924.2 ± 13.4 915.3 948.8 1.01 ± 0.02
head pedersen 912.3 ± 4.8 909.5 925.5 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.667 ± 0.010 1.652 1.681 1.01 ± 0.01
head poseidon_integration_benchmark 1.656 ± 0.007 1.645 1.667 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 3.524 ± 0.034 3.498 3.615 1.00 ± 0.01
head secp_integration_benchmark 3.507 ± 0.032 3.480 3.592 1.00
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.933 ± 0.005 1.925 1.942 1.00
head set_integration_benchmark 1.936 ± 0.011 1.927 1.967 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 8.302 ± 0.033 8.266 8.376 1.00
head uint256_integration_benchmark 8.404 ± 0.132 8.327 8.767 1.01 ± 0.02

@Oppen Oppen added this pull request to the merge queue May 30, 2023
Merged via the queue into main with commit 97823e5 May 30, 2023
30 of 31 checks passed
@Oppen Oppen deleted the deserialize-scientific-notation branch May 30, 2023 21:56
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Handle scientific notation cases in fn felt_from_number

* Update CHANGELOG.md

* Add aux function

* Add endline
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Handle scientific notation cases in fn felt_from_number

* Update CHANGELOG.md

* Add aux function

* Add endline
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.

None yet

3 participants