Skip to content

MLIR implementation of euclidean algorithm #1357

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DiegoCivi
Copy link
Contributor

Checklist

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

Copy link

github-actions bot commented Aug 11, 2025

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 11.396 ± 0.033 11.348 11.471 2.16 ± 0.02
cairo-native (embedded AOT) 5.264 ± 0.052 5.187 5.357 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 5.435 ± 0.025 5.395 5.470 1.03 ± 0.01

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 835.3 ± 19.2 818.7 870.5 1.00
cairo-native (embedded AOT) 4956.1 ± 31.9 4920.1 5038.1 5.93 ± 0.14
cairo-native (embedded JIT using LLVM's ORC Engine) 5017.8 ± 30.9 4978.4 5082.5 6.01 ± 0.14

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.340 ± 0.029 5.273 5.373 1.00 ± 0.01
cairo-native (embedded AOT) 5.330 ± 0.029 5.284 5.366 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 5.403 ± 0.041 5.352 5.481 1.01 ± 0.01

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.165 ± 0.015 5.137 5.187 1.04 ± 0.01
cairo-native (embedded AOT) 4.949 ± 0.051 4.866 5.022 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 5.057 ± 0.058 5.002 5.195 1.02 ± 0.02

Benchmark for program linear_search

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 870.2 ± 7.3 859.4 879.9 1.00
cairo-native (embedded AOT) 4991.3 ± 23.9 4952.0 5026.5 5.74 ± 0.06
cairo-native (embedded JIT using LLVM's ORC Engine) 5115.5 ± 39.2 5048.3 5157.4 5.88 ± 0.07

Benchmark for program logistic_map

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 545.6 ± 4.7 538.6 554.0 1.00
cairo-native (embedded AOT) 5143.5 ± 31.1 5087.6 5197.9 9.43 ± 0.10
cairo-native (embedded JIT using LLVM's ORC Engine) 5301.4 ± 57.1 5236.9 5407.7 9.72 ± 0.13

Copy link

github-actions bot commented Aug 11, 2025

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 5.275 ± 0.030 5.232 5.319 1.02 ± 0.01
base dict_insert.cairo (AOT) 5.193 ± 0.053 5.113 5.269 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 5.305 ± 0.039 5.252 5.372 1.02 ± 0.01
head dict_insert.cairo (AOT) 5.226 ± 0.033 5.170 5.280 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 4.998 ± 0.031 4.954 5.057 1.02 ± 0.01
base dict_snapshot.cairo (AOT) 4.901 ± 0.021 4.872 4.939 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 5.046 ± 0.034 5.001 5.101 1.03 ± 0.01
head dict_snapshot.cairo (AOT) 4.913 ± 0.050 4.865 5.030 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 5.371 ± 0.051 5.322 5.493 1.01 ± 0.01
base factorial_2M.cairo (AOT) 5.309 ± 0.036 5.254 5.361 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 5.410 ± 0.021 5.378 5.436 1.01 ± 0.01
head factorial_2M.cairo (AOT) 5.365 ± 0.027 5.328 5.400 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 4.894 ± 0.025 4.852 4.922 1.01 ± 0.01
base fib_2M.cairo (AOT) 4.858 ± 0.034 4.789 4.905 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 4.911 ± 0.025 4.868 4.953 1.00 ± 0.01
head fib_2M.cairo (AOT) 4.905 ± 0.064 4.848 5.064 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 5.112 ± 0.034 5.059 5.156 1.03 ± 0.01
base linear_search.cairo (AOT) 4.961 ± 0.027 4.904 4.991 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 5.183 ± 0.041 5.102 5.230 1.02 ± 0.02
head linear_search.cairo (AOT) 5.081 ± 0.067 4.962 5.210 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 5.182 ± 0.060 5.108 5.303 1.04 ± 0.01
base logistic_map.cairo (AOT) 5.005 ± 0.040 4.960 5.065 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 5.357 ± 0.091 5.235 5.546 1.04 ± 0.02
head logistic_map.cairo (AOT) 5.146 ± 0.032 5.094 5.204 1.00

@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.26%. Comparing base (c7a9a47) to head (eb31b3d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1357      +/-   ##
==========================================
+ Coverage   79.18%   79.26%   +0.07%     
==========================================
  Files         111      111              
  Lines       30434    30546     +112     
==========================================
+ Hits        24099    24211     +112     
  Misses       6335     6335              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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