Skip to content

Fixed top level type of i64 and i128 values.#1602

Merged
orizi merged 1 commit intomainfrom
orizi/bugfix/fix-top-level-i64-i128-ret-val
May 3, 2026
Merged

Fixed top level type of i64 and i128 values.#1602
orizi merged 1 commit intomainfrom
orizi/bugfix/fix-top-level-i64-i128-ret-val

Conversation

@orizi
Copy link
Copy Markdown
Collaborator

@orizi orizi commented May 3, 2026

Title

Fix top level returning functions serialization.

Introduces Breaking Changes?

No. The main used API is just serialization of Span and Array of felt252.

Checklist


This change is Reviewable

@orizi orizi requested a review from TomerStarkware May 3, 2026 12:11
Copy link
Copy Markdown
Collaborator

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

:lgtm:

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

@orizi orizi enabled auto-merge May 3, 2026 12:30
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 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.511 ± 0.049 11.421 11.593 5.69 ± 0.04
cairo-native (embedded AOT) 2.024 ± 0.012 2.003 2.039 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 2.113 ± 0.023 2.091 2.173 1.04 ± 0.01

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 548.4 ± 8.1 533.1 559.9 1.00
cairo-native (embedded AOT) 1680.8 ± 16.3 1656.9 1706.5 3.07 ± 0.05
cairo-native (embedded JIT using LLVM's ORC Engine) 1818.1 ± 12.5 1798.1 1832.0 3.32 ± 0.05

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.948 ± 0.020 4.928 4.981 2.28 ± 0.02
cairo-native (embedded AOT) 2.172 ± 0.014 2.140 2.190 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 2.218 ± 0.017 2.191 2.250 1.02 ± 0.01

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.830 ± 0.039 4.790 4.931 2.83 ± 0.03
cairo-native (embedded AOT) 1.705 ± 0.015 1.675 1.727 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 1.764 ± 0.018 1.737 1.785 1.03 ± 0.01

Benchmark for program linear_search

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 590.1 ± 7.5 580.2 600.9 1.00
cairo-native (embedded AOT) 1741.8 ± 18.2 1705.1 1762.3 2.95 ± 0.05
cairo-native (embedded JIT using LLVM's ORC Engine) 1858.8 ± 18.1 1835.0 1883.8 3.15 ± 0.05

Benchmark for program logistic_map

Open benchmarks
Command Mean [ms] Min [ms] Max [ms] Relative
Cairo-vm (Rust, Cairo 1) 496.0 ± 3.4 490.3 500.9 1.00
cairo-native (embedded AOT) 1878.2 ± 15.9 1849.5 1903.1 3.79 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 2041.7 ± 14.9 2007.6 2054.7 4.12 ± 0.04

@orizi orizi added this pull request to the merge queue May 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 2.087 ± 0.025 2.042 2.125 1.03 ± 0.02
base dict_insert.cairo (AOT) 2.023 ± 0.032 1.981 2.083 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 2.223 ± 0.024 2.178 2.253 1.05 ± 0.02
head dict_insert.cairo (AOT) 2.118 ± 0.035 2.052 2.179 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 1.852 ± 0.027 1.798 1.879 1.07 ± 0.02
base dict_snapshot.cairo (AOT) 1.726 ± 0.017 1.709 1.766 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 1.885 ± 0.026 1.860 1.932 1.06 ± 0.02
head dict_snapshot.cairo (AOT) 1.779 ± 0.017 1.755 1.802 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 2.244 ± 0.029 2.194 2.299 1.03 ± 0.02
base factorial_2M.cairo (AOT) 2.174 ± 0.029 2.123 2.211 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 2.284 ± 0.011 2.270 2.299 1.03 ± 0.01
head factorial_2M.cairo (AOT) 2.221 ± 0.027 2.182 2.290 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 1.788 ± 0.032 1.755 1.839 1.03 ± 0.02
base fib_2M.cairo (AOT) 1.730 ± 0.018 1.703 1.760 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 1.839 ± 0.035 1.794 1.922 1.03 ± 0.02
head fib_2M.cairo (AOT) 1.784 ± 0.022 1.760 1.833 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 1.904 ± 0.017 1.864 1.926 1.07 ± 0.01
base linear_search.cairo (AOT) 1.784 ± 0.015 1.760 1.816 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 1.944 ± 0.014 1.914 1.958 1.07 ± 0.01
head linear_search.cairo (AOT) 1.822 ± 0.017 1.793 1.842 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 2.062 ± 0.020 2.033 2.092 1.10 ± 0.01
base logistic_map.cairo (AOT) 1.879 ± 0.012 1.861 1.892 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 2.122 ± 0.021 2.089 2.154 1.09 ± 0.01
head logistic_map.cairo (AOT) 1.942 ± 0.018 1.918 1.980 1.00

Merged via the queue into main with commit 60eba82 May 3, 2026
26 checks passed
@orizi orizi deleted the orizi/bugfix/fix-top-level-i64-i128-ret-val branch May 3, 2026 13:34
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