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

Update cairo-lang to 2.11.1 #1136

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

Update cairo-lang to 2.11.1 #1136

wants to merge 3 commits into from

Conversation

FrancoGiachetta
Copy link
Contributor

@FrancoGiachetta FrancoGiachetta commented Mar 7, 2025

This PR updates cairo-lang to version 2.11.1, which brings some new things:

4 new libfuncs:

  • Trace
  • Felt252SquashedDict
  • Blake
  • GetUnspentGas

1 new type:

  • Blake

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 Mar 7, 2025

✅ Code is now correctly formatted.

Copy link

github-actions bot commented Mar 7, 2025

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 3.865 ± 0.017 3.838 3.892 1.02 ± 0.01
base dict_insert.cairo (AOT) 3.779 ± 0.012 3.757 3.792 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 4.872 ± 0.089 4.766 5.060 1.03 ± 0.02
head dict_insert.cairo (AOT) 4.751 ± 0.057 4.620 4.811 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 3.741 ± 0.022 3.692 3.773 1.02 ± 0.01
base dict_snapshot.cairo (AOT) 3.651 ± 0.021 3.615 3.690 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 4.745 ± 0.062 4.678 4.853 1.01 ± 0.04
head dict_snapshot.cairo (AOT) 4.712 ± 0.162 4.539 5.042 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 4.086 ± 0.019 4.058 4.120 1.01 ± 0.01
base factorial_2M.cairo (AOT) 4.052 ± 0.017 4.026 4.081 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 5.109 ± 0.030 5.054 5.149 1.00 ± 0.02
head factorial_2M.cairo (AOT) 5.085 ± 0.097 4.991 5.305 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 3.637 ± 0.024 3.605 3.687 1.01 ± 0.01
base fib_2M.cairo (AOT) 3.587 ± 0.022 3.556 3.631 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 4.560 ± 0.035 4.510 4.627 1.00
head fib_2M.cairo (AOT) 4.578 ± 0.065 4.523 4.726 1.00 ± 0.02

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 3.816 ± 0.026 3.777 3.856 1.03 ± 0.01
base linear_search.cairo (AOT) 3.687 ± 0.027 3.649 3.726 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 4.809 ± 0.053 4.738 4.883 1.03 ± 0.02
head linear_search.cairo (AOT) 4.689 ± 0.057 4.594 4.798 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 3.931 ± 0.027 3.879 3.963 1.04 ± 0.01
base logistic_map.cairo (AOT) 3.780 ± 0.039 3.730 3.878 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 4.864 ± 0.029 4.826 4.901 1.03 ± 0.01
head logistic_map.cairo (AOT) 4.734 ± 0.062 4.656 4.826 1.00

Copy link

github-actions bot commented Mar 7, 2025

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 16.745 ± 0.429 16.125 17.261 3.07 ± 0.11
cairo-native (embedded AOT) 5.615 ± 0.187 5.343 5.895 1.03 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 5.448 ± 0.130 5.267 5.674 1.00

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 690.8 ± 12.1 669.1 713.2 1.00
cairo-native (embedded AOT) 4832.4 ± 68.9 4728.4 4945.4 7.00 ± 0.16
cairo-native (embedded JIT using LLVM's ORC Engine) 5217.8 ± 83.2 5093.9 5353.1 7.55 ± 0.18

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 9.769 ± 0.119 9.612 10.003 1.77 ± 0.04
cairo-native (embedded AOT) 5.631 ± 0.094 5.495 5.772 1.02 ± 0.02
cairo-native (embedded JIT using LLVM's ORC Engine) 5.510 ± 0.092 5.318 5.632 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 9.336 ± 0.112 9.215 9.519 1.97 ± 0.04
cairo-native (embedded AOT) 4.927 ± 0.097 4.743 5.046 1.04 ± 0.03
cairo-native (embedded JIT using LLVM's ORC Engine) 4.740 ± 0.072 4.633 4.879 1.00

Benchmark for program linear_search

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 723.3 ± 11.8 708.4 739.6 1.00
cairo-native (embedded AOT) 5210.1 ± 70.0 5134.6 5357.7 7.20 ± 0.15
cairo-native (embedded JIT using LLVM's ORC Engine) 5184.2 ± 72.0 5091.0 5287.3 7.17 ± 0.15

Benchmark for program logistic_map

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 450.4 ± 10.6 436.6 465.1 1.00
cairo-native (embedded AOT) 5143.9 ± 67.6 5024.2 5262.8 11.42 ± 0.31
cairo-native (embedded JIT using LLVM's ORC Engine) 5267.0 ± 235.2 4939.3 5635.2 11.69 ± 0.59

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.

1 participant