Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make benches/libfuncs.rs also run AOT benches #868

Merged
merged 6 commits into from
Oct 28, 2024
Merged

make benches/libfuncs.rs also run AOT benches #868

merged 6 commits into from
Oct 28, 2024

Conversation

edg-l
Copy link
Member

@edg-l edg-l commented Oct 18, 2024

Fixes #867

Copy link

github-actions bot commented Oct 18, 2024

✅ Code is now correctly formatted.

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.82%. Comparing base (e36bf30) to head (5e66fa5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #868   +/-   ##
=======================================
  Coverage   82.82%   82.82%           
=======================================
  Files         120      120           
  Lines       34941    34941           
=======================================
  Hits        28941    28941           
  Misses       6000     6000           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Oct 18, 2024

Benchmarking results

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 11.104 ± 0.362 10.748 11.674 24.77 ± 0.81
cairo-native (embedded AOT) 3.102 ± 0.024 3.066 3.140 6.92 ± 0.06
cairo-native (embedded JIT using LLVM's ORC Engine) 3.194 ± 0.038 3.121 3.235 7.13 ± 0.09
cairo-native (standalone AOT) 0.674 ± 0.001 0.672 0.676 1.50 ± 0.01
cairo-native (standalone AOT with -march=native) 0.448 ± 0.002 0.445 0.451 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 11.215 ± 0.280 10.789 11.547 1401.74 ± 40.57
cairo-native (embedded AOT) 2.692 ± 0.036 2.645 2.774 336.51 ± 6.71
cairo-native (embedded JIT using LLVM's ORC Engine) 2.690 ± 0.021 2.663 2.725 336.17 ± 5.60
cairo-native (standalone AOT) 0.008 ± 0.000 0.008 0.009 1.04 ± 0.02
cairo-native (standalone AOT with -march=native) 0.008 ± 0.000 0.007 0.009 1.00

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.270 ± 0.020 4.227 4.306 61.25 ± 0.92
cairo-native (embedded AOT) 2.873 ± 0.035 2.818 2.914 41.21 ± 0.77
cairo-native (embedded JIT using LLVM's ORC Engine) 2.999 ± 0.019 2.974 3.042 43.02 ± 0.67
cairo-native (standalone AOT) 0.114 ± 0.001 0.110 0.115 1.63 ± 0.03
cairo-native (standalone AOT with -march=native) 0.070 ± 0.001 0.067 0.072 1.00

Copy link

github-actions bot commented Oct 18, 2024

Benchmark results Main vs HEAD.

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 3.162 ± 0.018 3.134 3.193 1.01 ± 0.01
base factorial_2M.cairo (JIT) 3.182 ± 0.013 3.159 3.199 1.01 ± 0.01
head factorial_2M.cairo (AOT) 3.142 ± 0.018 3.111 3.173 1.00
base factorial_2M.cairo (AOT) 3.200 ± 0.024 3.161 3.249 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 2.792 ± 0.042 2.742 2.875 1.00
base fib_2M.cairo (JIT) 2.813 ± 0.025 2.769 2.855 1.01 ± 0.02
head fib_2M.cairo (AOT) 2.809 ± 0.043 2.750 2.880 1.01 ± 0.02
base fib_2M.cairo (AOT) 2.821 ± 0.064 2.759 2.945 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 3.091 ± 0.022 3.060 3.117 1.07 ± 0.01
base logistic_map.cairo (JIT) 3.114 ± 0.032 3.054 3.160 1.08 ± 0.02
head logistic_map.cairo (AOT) 2.897 ± 0.032 2.846 2.949 1.00 ± 0.02
base logistic_map.cairo (AOT) 2.884 ± 0.030 2.841 2.928 1.00

@edg-l edg-l marked this pull request as ready for review October 21, 2024 07:30
@edg-l edg-l changed the title bench improvement make benches/libfuncs.rs also run AOT benches Oct 21, 2024
@edg-l edg-l added the review-ready A PR that is ready for review label Oct 21, 2024
Copy link
Contributor

@JulianGCalderon JulianGCalderon left a comment

Choose a reason for hiding this comment

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

Looks good to me, but why was programs/compile_benches changed?

@edg-l
Copy link
Member Author

edg-l commented Oct 28, 2024

Looks good to me, but why was programs/compile_benches changed?

apparently they werent run on ci, so they were outdated cairo code that doesnt compile with the modern version

@edg-l edg-l added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit ab47832 Oct 28, 2024
43 of 46 checks passed
@edg-l edg-l deleted the bench_improv branch October 28, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-ready A PR that is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

benches/libfuncs.rs should also run AOT benches
4 participants