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 bug in ec_point_from_x #386

Merged
merged 9 commits into from
Dec 15, 2023
Merged

Fix bug in ec_point_from_x #386

merged 9 commits into from
Dec 15, 2023

Conversation

fmoletta
Copy link
Collaborator

@fmoletta fmoletta commented Dec 14, 2023

Libfunc ec_point_from_x_nz now uses -y instead of y when y > PRIME / 2
Add comparison between native and vm values for NonZero types
Tests ec_point_from_x_proptest, ec_point_from_x_big & ec_point_from_x_small now passing

@fmoletta fmoletta changed the title Fix bug in ec_point_from_x Fix bug in ec_point_from_x Dec 14, 2023
@fmoletta fmoletta marked this pull request as ready for review December 14, 2023 20:51
Copy link

Benchmarking results

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 20.844 ± 0.133 20.650 21.025 42.95 ± 0.29
cairo-native (JIT MLIR ORC Engine) 1.531 ± 0.011 1.518 1.555 3.15 ± 0.02
cairo-native (AOT Native binary) 0.661 ± 0.004 0.658 0.672 1.36 ± 0.01
cairo-native (AOT Native binary with host CPU features, march=native) 0.485 ± 0.001 0.484 0.488 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 20.378 ± 0.167 20.206 20.689 652.99 ± 10.41
cairo-native (JIT MLIR ORC Engine) 1.114 ± 0.010 1.102 1.133 35.70 ± 0.58
cairo-native (AOT Native binary) 0.031 ± 0.000 0.031 0.033 1.00
cairo-native (AOT Native binary with host CPU features, march=native) 0.031 ± 0.000 0.031 0.032 1.00 ± 0.01

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 1.895 ± 0.022 1.868 1.924 27.13 ± 0.32
cairo-native (JIT MLIR ORC Engine) 1.414 ± 0.011 1.398 1.428 20.25 ± 0.16
cairo-native (AOT Native binary) 0.109 ± 0.000 0.109 0.110 1.56 ± 0.00
cairo-native (AOT Native binary with host CPU features, march=native) 0.070 ± 0.000 0.070 0.070 1.00

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (52f8e19) 75.89% compared to head (c2acaa3) 75.89%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #386   +/-   ##
=======================================
  Coverage   75.89%   75.89%           
=======================================
  Files         100      100           
  Lines       23897    23901    +4     
=======================================
+ Hits        18136    18140    +4     
  Misses       5761     5761           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edg-l
Copy link
Member

edg-l commented Dec 15, 2023

Thanks for fixing this bug!

@edg-l edg-l merged commit 3f6f705 into main Dec 15, 2023
8 checks passed
@edg-l edg-l deleted the fix-ec_point_from_x_big branch December 15, 2023 09:40
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.

Failing test: ec_point_from_x_proptest Failing test: ec_point_from_x_big
3 participants