Skip to content

Conversation

@DiegoCivi
Copy link
Contributor

@DiegoCivi DiegoCivi commented Nov 6, 2025

Implement Squashed Felt252 Dict Entries libfunc

Closes #1151

Introduces Breaking Changes?

No.

Checklist

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

@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 1.78571% with 330 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.19%. Comparing base (941149c) to head (1a6a317).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/libfuncs/squashed_dict.rs 0.00% 244 Missing ⚠️
src/metadata/runtime_bindings.rs 7.69% 48 Missing ⚠️
src/runtime.rs 0.00% 36 Missing ⚠️
src/libfuncs.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1446      +/-   ##
==========================================
- Coverage   81.55%   79.19%   -2.37%     
==========================================
  Files         105      108       +3     
  Lines       25745    26559     +814     
==========================================
+ Hits        20997    21033      +36     
- Misses       4748     5526     +778     

☔ 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.

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 2.523 ± 0.014 2.504 2.546 1.04 ± 0.01
base dict_insert.cairo (AOT) 2.438 ± 0.012 2.424 2.459 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 2.632 ± 0.029 2.585 2.674 1.06 ± 0.02
head dict_insert.cairo (AOT) 2.488 ± 0.025 2.440 2.522 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 2.238 ± 0.015 2.218 2.260 1.05 ± 0.01
base dict_snapshot.cairo (AOT) 2.127 ± 0.013 2.105 2.149 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 2.297 ± 0.029 2.241 2.346 1.05 ± 0.02
head dict_snapshot.cairo (AOT) 2.191 ± 0.031 2.147 2.240 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 2.609 ± 0.018 2.584 2.633 1.00 ± 0.01
base factorial_2M.cairo (AOT) 2.603 ± 0.016 2.576 2.626 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 2.635 ± 0.020 2.591 2.657 1.00 ± 0.02
head factorial_2M.cairo (AOT) 2.628 ± 0.036 2.567 2.675 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 2.173 ± 0.024 2.125 2.215 1.03 ± 0.01
base fib_2M.cairo (AOT) 2.109 ± 0.014 2.086 2.126 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 2.238 ± 0.022 2.199 2.276 1.04 ± 0.03
head fib_2M.cairo (AOT) 2.158 ± 0.053 2.089 2.239 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base heavy_circuit.cairo (JIT) 13.940 ± 0.065 13.850 14.088 1.03 ± 0.01
base heavy_circuit.cairo (AOT) 13.515 ± 0.024 13.459 13.543 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head heavy_circuit.cairo (JIT) 15.022 ± 0.059 14.925 15.113 1.03 ± 0.01
head heavy_circuit.cairo (AOT) 14.599 ± 0.124 14.437 14.810 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 2.317 ± 0.014 2.291 2.338 1.06 ± 0.01
base linear_search.cairo (AOT) 2.181 ± 0.015 2.156 2.204 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 2.352 ± 0.024 2.315 2.382 1.07 ± 0.02
head linear_search.cairo (AOT) 2.195 ± 0.027 2.158 2.250 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 2.435 ± 0.016 2.414 2.459 1.08 ± 0.01
base logistic_map.cairo (AOT) 2.259 ± 0.018 2.228 2.283 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 2.420 ± 0.017 2.390 2.445 1.07 ± 0.01
head logistic_map.cairo (AOT) 2.255 ± 0.013 2.232 2.270 1.00

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 11.133 ± 0.056 11.077 11.254 5.79 ± 0.06
cairo-native (embedded AOT) 1.922 ± 0.018 1.895 1.942 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.962 ± 0.032 1.908 2.014 1.02 ± 0.02

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 559.0 ± 6.1 550.8 572.1 1.00
cairo-native (embedded AOT) 1559.8 ± 17.3 1534.7 1580.8 2.79 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 1662.9 ± 16.3 1646.6 1692.0 2.97 ± 0.04

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.966 ± 0.011 4.953 4.984 2.44 ± 0.05
cairo-native (embedded AOT) 2.033 ± 0.045 1.964 2.105 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 2.127 ± 0.034 2.089 2.183 1.05 ± 0.03

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.883 ± 0.007 4.868 4.893 3.17 ± 0.03
cairo-native (embedded AOT) 1.538 ± 0.016 1.518 1.561 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.638 ± 0.011 1.612 1.648 1.06 ± 0.01

Benchmark for program heavy_circuit

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 9.925 ± 0.091 9.767 10.067 1.00
cairo-native (embedded AOT) 13.691 ± 0.177 13.499 14.020 1.38 ± 0.02
cairo-native (embedded JIT using LLVM's ORC Engine) 14.447 ± 0.117 14.306 14.685 1.46 ± 0.02

Benchmark for program linear_search

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 600.6 ± 5.5 591.8 607.6 1.00
cairo-native (embedded AOT) 1627.0 ± 15.7 1610.6 1662.9 2.71 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 1741.2 ± 10.9 1726.9 1758.3 2.90 ± 0.03

Benchmark for program logistic_map

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 532.3 ± 5.6 524.9 540.6 1.00
cairo-native (embedded AOT) 1755.3 ± 32.7 1714.5 1793.1 3.30 ± 0.07
cairo-native (embedded JIT using LLVM's ORC Engine) 1916.7 ± 48.1 1841.5 1978.8 3.60 ± 0.10

@gabrielbosio gabrielbosio added the libfuncs Library Function implementations label Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libfuncs Library Function implementations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.11.1] Implement Squashed Felt252 Dict Entries Libfunc

4 participants