Skip to content

Conversation

@TomerStarkware
Copy link
Collaborator

@TomerStarkware TomerStarkware commented Feb 3, 2026

Title

Closes #NA

Introduces Breaking Changes?

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.

This change is Reviewable

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 2.091 ± 0.043 2.058 2.201 1.04 ± 0.02
base dict_insert.cairo (AOT) 2.005 ± 0.019 1.983 2.039 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 2.225 ± 0.046 2.159 2.289 1.04 ± 0.03
head dict_insert.cairo (AOT) 2.145 ± 0.050 2.072 2.221 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 1.856 ± 0.039 1.819 1.933 1.10 ± 0.03
base dict_snapshot.cairo (AOT) 1.686 ± 0.016 1.658 1.711 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 1.901 ± 0.037 1.853 1.948 1.05 ± 0.03
head dict_snapshot.cairo (AOT) 1.814 ± 0.025 1.758 1.844 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 2.161 ± 0.011 2.150 2.180 1.01 ± 0.01
base factorial_2M.cairo (AOT) 2.129 ± 0.012 2.113 2.150 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 2.301 ± 0.059 2.190 2.350 1.01 ± 0.03
head factorial_2M.cairo (AOT) 2.268 ± 0.049 2.172 2.326 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 1.745 ± 0.012 1.721 1.761 1.02 ± 0.02
base fib_2M.cairo (AOT) 1.716 ± 0.024 1.676 1.763 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 1.872 ± 0.050 1.799 1.939 1.03 ± 0.04
head fib_2M.cairo (AOT) 1.820 ± 0.049 1.729 1.876 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 1.888 ± 0.019 1.856 1.919 1.10 ± 0.02
base linear_search.cairo (AOT) 1.712 ± 0.020 1.673 1.739 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 1.968 ± 0.034 1.932 2.047 1.08 ± 0.03
head linear_search.cairo (AOT) 1.820 ± 0.047 1.758 1.911 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 2.000 ± 0.012 1.979 2.022 1.09 ± 0.01
base logistic_map.cairo (AOT) 1.831 ± 0.015 1.809 1.851 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 2.142 ± 0.028 2.089 2.185 1.10 ± 0.02
head logistic_map.cairo (AOT) 1.956 ± 0.032 1.917 2.006 1.00

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 11.142 ± 0.084 11.036 11.251 5.64 ± 0.07
cairo-native (embedded AOT) 1.975 ± 0.018 1.949 2.008 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 2.067 ± 0.016 2.047 2.096 1.05 ± 0.01

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 570.1 ± 4.6 562.4 575.8 1.00
cairo-native (embedded AOT) 1665.0 ± 17.9 1636.7 1686.8 2.92 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 1785.1 ± 16.1 1763.5 1811.3 3.13 ± 0.04

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.962 ± 0.021 4.939 5.015 2.34 ± 0.05
cairo-native (embedded AOT) 2.117 ± 0.042 2.081 2.231 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 2.179 ± 0.016 2.155 2.202 1.03 ± 0.02

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.855 ± 0.017 4.836 4.898 2.92 ± 0.03
cairo-native (embedded AOT) 1.661 ± 0.018 1.636 1.689 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.720 ± 0.013 1.702 1.743 1.04 ± 0.01

Benchmark for program linear_search

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 619.3 ± 5.6 611.4 627.6 1.00
cairo-native (embedded AOT) 1711.8 ± 23.7 1682.7 1749.4 2.76 ± 0.05
cairo-native (embedded JIT using LLVM's ORC Engine) 1837.1 ± 9.9 1822.2 1853.4 2.97 ± 0.03

Benchmark for program logistic_map

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 523.7 ± 5.3 517.0 532.5 1.00
cairo-native (embedded AOT) 1838.6 ± 12.2 1820.4 1856.6 3.51 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 2000.1 ± 13.1 1984.7 2019.2 3.82 ± 0.05

@TomerStarkware TomerStarkware force-pushed the tomer/move_array_metadata branch from 363e838 to 8f28b8e Compare February 4, 2026 12:46
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 88.58025% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.87%. Comparing base (26d2cab) to head (19712ec).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/starknet.rs 0.00% 27 Missing ⚠️
src/libfuncs/array.rs 94.07% 9 Missing ⚠️
src/types/array.rs 98.68% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1551      +/-   ##
==========================================
- Coverage   72.88%   72.87%   -0.02%     
==========================================
  Files         110      110              
  Lines       27137    27152      +15     
==========================================
+ Hits        19780    19788       +8     
- Misses       7357     7364       +7     

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

@gabrielbosio
Copy link
Collaborator

Hey @TomerStarkware, a few things to address:

  1. The documentation table in src/types/array.rs (lines 10-15) still shows the old layout.

  2. Comments at src/libfuncs/array.rs lines 221 and 587 mention capacity in the metadata struct, but ArrayMetadata only has 3 fields (refcount, max_len, data_ptr).

  3. Could you share the benchmark results? The new layout adds an extra pointer indirection and a second allocation, so we want to make sure there's no performance regression.

@TomerStarkware TomerStarkware force-pushed the tomer/move_array_metadata branch from 8f28b8e to 19712ec Compare February 8, 2026 18:15
Copy link
Collaborator Author

@TomerStarkware TomerStarkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 and 2 Done,
How do I share the benchmark?
The second pointer existed before. Now you can access the metadata fields (ref_count, max_len) with a single pointer, whereas before you needed a double dereference for them.

@TomerStarkware made 1 comment.
Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @azteca1998, @edg-l, @entropidelic, @gabrielbosio, @igaray, @jrchatruc, @Oppen, and @pefontana).

@gabrielbosio
Copy link
Collaborator

You can post the numbers here.
In general, we presented the results adding the following specs:

Screenshot 2026-02-11 at 10 45 09 AM

Copy link
Collaborator Author

@TomerStarkware TomerStarkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant, is there a command to run?

@TomerStarkware made 1 comment.
Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @azteca1998, @edg-l, @entropidelic, @gabrielbosio, @igaray, @jrchatruc, @Oppen, and @pefontana).

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.

3 participants