cairo_native
cairo_native copied to clipboard
Update cairo-lang to 2.7.0
This PR updates cairo-lang to version 2.7.0.
Checklist
- [ ] Linked to Github Issue
- [ ] Unit tests added
- [ ] Integration tests added.
- [ ] This change requires new documentation.
- [ ] Documentation has been added/updated.
✅ Code is now correctly formatted.
Current Status
All cairo-lang dependencies have been updated, including corelib's and scarb's version. The code has also been adapted to the new implementations.
Still to be solved
- Changes introduce new libfuncs, which cases were left with
todo!()for now. extract_location_from_stable_locshould be adapted to receive aVec<StableLocation>. Line code.- A new struct
TestsCompilationConfighas an attributeadd_statement_functionswhich should be check whether it needs to betrueorfalseLine code. - There's a change in the
Cairo1HintProcessor's constructor which adds a new parametersegment_arena_validations: bool. It represents whether it should use a single segment for dictionaries to aid in segment arena validations. In case oftrue, The program must call theRelocateAllDictionariesCheatcode. Line code alexandria's version is incompatible now (2.6.3). Luckily there's a PR which should be merged soon.
Benchmarking results
Benchmark for program factorial_2M
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.256 ± 0.093 | 10.107 | 10.415 | 21.33 ± 0.19 |
cairo-native (embedded AOT) |
3.597 ± 0.036 | 3.539 | 3.636 | 7.48 ± 0.08 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.631 ± 0.030 | 3.581 | 3.686 | 7.55 ± 0.06 |
cairo-native (standalone AOT) |
0.654 ± 0.001 | 0.651 | 0.656 | 1.36 ± 0.00 |
cairo-native (standalone AOT with -march=native) |
0.481 ± 0.001 | 0.480 | 0.482 | 1.00 |
Benchmark for program fib_2M
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.203 ± 0.056 | 10.115 | 10.289 | 1240.21 ± 20.12 |
cairo-native (embedded AOT) |
3.125 ± 0.021 | 3.082 | 3.167 | 379.81 ± 6.33 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.175 ± 0.034 | 3.141 | 3.242 | 385.92 ± 7.19 |
cairo-native (standalone AOT) |
0.009 ± 0.000 | 0.008 | 0.009 | 1.04 ± 0.02 |
cairo-native (standalone AOT with -march=native) |
0.008 ± 0.000 | 0.008 | 0.009 | 1.00 |
Benchmark for program logistic_map
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
5.431 ± 0.058 | 5.344 | 5.519 | 81.41 ± 1.89 |
cairo-native (embedded AOT) |
3.298 ± 0.033 | 3.244 | 3.352 | 49.44 ± 1.13 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.467 ± 0.039 | 3.401 | 3.536 | 51.98 ± 1.22 |
cairo-native (standalone AOT) |
0.107 ± 0.000 | 0.107 | 0.108 | 1.61 ± 0.03 |
cairo-native (standalone AOT with -march=native) |
0.067 ± 0.001 | 0.066 | 0.073 | 1.00 |
Codecov Report
Attention: Patch coverage is 75.35531% with 815 lines in your changes missing coverage. Please review.
Project coverage is 88.56%. Comparing base (
0d91a8a) to head (d337209). Report is 224 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #734 +/- ##
==========================================
- Coverage 91.03% 88.56% -2.47%
==========================================
Files 117 120 +3
Lines 32671 35375 +2704
==========================================
+ Hits 29741 31330 +1589
- Misses 2930 4045 +1115
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.