Skip to content

Conversation

@FrancoGiachetta
Copy link
Contributor

Use Montgomery representation for Felts

Closes #NA

Introduces Breaking Changes?

Yes/No.

These PRs should be merged after this one right away, in that order.

Checklist

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

@github-actions
Copy link

github-actions bot commented Oct 31, 2025

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 2.664 ± 0.084 2.576 2.835 1.06 ± 0.04
base dict_insert.cairo (AOT) 2.513 ± 0.050 2.465 2.640 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 2.731 ± 0.031 2.694 2.801 1.03 ± 0.01
head dict_insert.cairo (AOT) 2.647 ± 0.021 2.624 2.688 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 2.341 ± 0.047 2.295 2.413 1.05 ± 0.04
base dict_snapshot.cairo (AOT) 2.237 ± 0.061 2.170 2.352 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 2.430 ± 0.027 2.402 2.487 1.02 ± 0.02
head dict_snapshot.cairo (AOT) 2.371 ± 0.031 2.326 2.432 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 2.702 ± 0.075 2.655 2.905 1.01 ± 0.04
base factorial_2M.cairo (AOT) 2.680 ± 0.061 2.595 2.759 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 2.405 ± 0.023 2.375 2.452 1.03 ± 0.01
head factorial_2M.cairo (AOT) 2.346 ± 0.023 2.308 2.381 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 2.215 ± 0.036 2.169 2.278 1.01 ± 0.03
base fib_2M.cairo (AOT) 2.187 ± 0.047 2.131 2.285 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 2.354 ± 0.064 2.302 2.519 1.04 ± 0.03
head fib_2M.cairo (AOT) 2.269 ± 0.021 2.241 2.299 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base heavy_circuit.cairo (JIT) 14.087 ± 0.128 13.941 14.314 1.02 ± 0.01
base heavy_circuit.cairo (AOT) 13.779 ± 0.080 13.634 13.894 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head heavy_circuit.cairo (JIT) 13.451 ± 0.136 13.324 13.758 1.04 ± 0.01
head heavy_circuit.cairo (AOT) 12.957 ± 0.097 12.816 13.116 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 2.443 ± 0.069 2.371 2.576 1.09 ± 0.03
base linear_search.cairo (AOT) 2.236 ± 0.021 2.204 2.271 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 2.492 ± 0.031 2.449 2.545 1.08 ± 0.02
head linear_search.cairo (AOT) 2.312 ± 0.023 2.279 2.345 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 2.507 ± 0.031 2.463 2.552 1.09 ± 0.02
base logistic_map.cairo (AOT) 2.307 ± 0.032 2.265 2.388 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 2.447 ± 0.040 2.383 2.515 1.05 ± 0.03
head logistic_map.cairo (AOT) 2.320 ± 0.042 2.244 2.382 1.00

@github-actions
Copy link

github-actions bot commented Oct 31, 2025

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 11.151 ± 0.038 11.103 11.217 6.04 ± 0.06
cairo-native (embedded AOT) 1.845 ± 0.019 1.820 1.869 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.908 ± 0.016 1.889 1.933 1.03 ± 0.01

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 544.3 ± 12.7 535.9 579.8 1.00
cairo-native (embedded AOT) 1533.8 ± 12.8 1515.2 1549.1 2.82 ± 0.07
cairo-native (embedded JIT using LLVM's ORC Engine) 1647.2 ± 10.5 1630.6 1663.8 3.03 ± 0.07

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.979 ± 0.020 4.963 5.013 3.24 ± 0.03
cairo-native (embedded AOT) 1.539 ± 0.012 1.515 1.560 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.580 ± 0.012 1.566 1.597 1.03 ± 0.01

Benchmark for program factorial_2M_inv

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 12.994 ± 0.093 12.834 13.156 2.13 ± 0.02
cairo-native (embedded AOT) 6.111 ± 0.015 6.097 6.134 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 6.176 ± 0.035 6.145 6.271 1.01 ± 0.01

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.929 ± 0.019 4.901 4.953 3.27 ± 0.02
cairo-native (embedded AOT) 1.506 ± 0.008 1.491 1.513 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.555 ± 0.010 1.540 1.567 1.03 ± 0.01

Benchmark for program heavy_circuit

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 9.758 ± 0.096 9.637 9.921 1.00
cairo-native (embedded AOT) 11.651 ± 0.029 11.607 11.695 1.19 ± 0.01
cairo-native (embedded JIT using LLVM's ORC Engine) 12.112 ± 0.064 12.009 12.260 1.24 ± 0.01

Benchmark for program linear_search

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 580.5 ± 4.6 572.4 587.7 1.00
cairo-native (embedded AOT) 1576.4 ± 18.4 1558.0 1619.8 2.72 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 1710.5 ± 12.3 1692.1 1727.3 2.95 ± 0.03

Benchmark for program logistic_map

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 501.5 ± 11.9 488.5 524.0 1.00
cairo-native (embedded AOT) 1576.8 ± 22.9 1533.9 1612.5 3.14 ± 0.09
cairo-native (embedded JIT using LLVM's ORC Engine) 1667.3 ± 16.5 1648.5 1697.3 3.32 ± 0.09

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

✅ Code is now correctly formatted.

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