Skip to content

ci: cache rust dependencies in the macOS test job - #1673

Open
TomerStarkware wants to merge 1 commit into
mainfrom
tomer/macos-rust-cache
Open

TomerStarkware wants to merge 1 commit into
mainfrom
tomer/macos-rust-cache

Conversation

@TomerStarkware

@TomerStarkware TomerStarkware commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

The macOS test job rebuilt every dependency from scratch on each run, making it the slowest job in CI (~64m). This adds the same pinned Swatinem/rust-cache step the Linux test job already uses, placed right after the toolchain install.

Splitting test-cairo into its own job is left for a follow-up so the cache win can be measured on its own first.

🤖 Generated with Claude Code


This change is Reviewable

The macOS job rebuilt every dependency from scratch on each run. Add the
same Swatinem/rust-cache step the Linux test job already uses.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 1.612 ± 0.006 1.602 1.619 1.00
base dict_insert.cairo (AOT) 1.732 ± 0.297 1.603 2.577 1.07 ± 0.18

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 1.212 ± 0.016 1.196 1.255 1.00
head dict_insert.cairo (AOT) 1.214 ± 0.012 1.197 1.229 1.00 ± 0.02

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 1.355 ± 0.013 1.333 1.384 1.01 ± 0.03
base dict_snapshot.cairo (AOT) 1.341 ± 0.037 1.314 1.432 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 1.016 ± 0.010 1.004 1.031 1.05 ± 0.01
head dict_snapshot.cairo (AOT) 0.972 ± 0.006 0.965 0.983 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 1.386 ± 0.004 1.381 1.392 1.00
base factorial_2M.cairo (AOT) 1.393 ± 0.011 1.378 1.414 1.01 ± 0.01

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 1.013 ± 0.005 1.006 1.021 1.00
head factorial_2M.cairo (AOT) 1.014 ± 0.016 1.001 1.046 1.00 ± 0.02

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 1.365 ± 0.019 1.340 1.405 1.00
base fib_2M.cairo (AOT) 1.378 ± 0.030 1.340 1.440 1.01 ± 0.03

Head

Command Mean [ms] Min [ms] Max [ms] Relative
head fib_2M.cairo (JIT) 989.1 ± 7.3 981.1 1001.6 1.00 ± 0.02
head fib_2M.cairo (AOT) 984.5 ± 19.9 963.1 1025.0 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 1.406 ± 0.033 1.364 1.454 1.03 ± 0.03
base linear_search.cairo (AOT) 1.363 ± 0.023 1.340 1.407 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 1.005 ± 0.013 0.996 1.031 1.01 ± 0.03
head linear_search.cairo (AOT) 0.998 ± 0.023 0.985 1.062 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 1.354 ± 0.009 1.342 1.369 1.01 ± 0.01
base logistic_map.cairo (AOT) 1.337 ± 0.015 1.319 1.372 1.00

Head

Command Mean [ms] Min [ms] Max [ms] Relative
head logistic_map.cairo (JIT) 997.5 ± 7.6 985.7 1015.7 1.02 ± 0.03
head logistic_map.cairo (AOT) 978.1 ± 24.3 961.8 1046.1 1.00

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 15.155 ± 0.155 14.961 15.449 7.52 ± 0.09
cairo-native (embedded AOT) 2.015 ± 0.011 2.006 2.037 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 2.031 ± 0.008 2.020 2.050 1.01 ± 0.01

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 565.8 ± 5.9 555.8 573.7 1.00
cairo-native (embedded AOT) 1686.7 ± 19.1 1664.2 1722.1 2.98 ± 0.05
cairo-native (embedded JIT using LLVM's ORC Engine) 1718.7 ± 13.2 1687.6 1730.7 3.04 ± 0.04

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 7.142 ± 0.096 7.073 7.386 4.09 ± 0.06
cairo-native (embedded AOT) 1.745 ± 0.011 1.727 1.767 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.753 ± 0.008 1.741 1.765 1.00 ± 0.01

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 7.082 ± 0.094 7.010 7.281 4.12 ± 0.09
cairo-native (embedded AOT) 1.719 ± 0.029 1.685 1.766 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.749 ± 0.019 1.717 1.776 1.02 ± 0.02

Benchmark for program linear_search

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 593.2 ± 1.9 590.2 595.4 1.00
cairo-native (embedded AOT) 1696.9 ± 7.5 1684.7 1706.2 2.86 ± 0.02
cairo-native (embedded JIT using LLVM's ORC Engine) 1739.3 ± 13.3 1723.6 1765.9 2.93 ± 0.02

Benchmark for program logistic_map

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 509.5 ± 1.4 507.5 512.9 1.00
cairo-native (embedded AOT) 1676.7 ± 11.1 1659.3 1696.3 3.29 ± 0.02
cairo-native (embedded JIT using LLVM's ORC Engine) 1703.9 ± 13.2 1686.3 1725.8 3.34 ± 0.03

@orizi orizi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:lgtm:

@orizi reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on TomerStarkware).

This branch has not been deployed

No deployments
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