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

Change tests to use sierra generator #1057

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

FrancoGiachetta
Copy link
Contributor

@FrancoGiachetta FrancoGiachetta commented Jan 16, 2025

This PR uses the sierra generator to test libfuncs. This is to prevent us from any possible change in the sierra generator which could generate false positives in tests.

Checklist

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

Copy link

github-actions bot commented Jan 16, 2025

❌ Code is not formatted! Please run cargo format and push the changes.

Copy link

github-actions bot commented Jan 16, 2025

Benchmark results Main vs HEAD.

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 3.941 ± 0.058 3.859 4.045 1.00
base dict_insert.cairo (AOT) 4.130 ± 0.057 4.076 4.242 1.05 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head dict_insert.cairo (JIT) 3.834 ± 0.019 3.803 3.870 1.00
head dict_insert.cairo (AOT) 3.988 ± 0.040 3.958 4.077 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 3.805 ± 0.040 3.749 3.884 1.00
base dict_snapshot.cairo (AOT) 3.993 ± 0.061 3.909 4.108 1.05 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head dict_snapshot.cairo (JIT) 3.730 ± 0.036 3.683 3.788 1.00
head dict_snapshot.cairo (AOT) 3.848 ± 0.016 3.829 3.871 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 4.162 ± 0.036 4.119 4.243 1.00
base factorial_2M.cairo (AOT) 4.408 ± 0.036 4.372 4.468 1.06 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head factorial_2M.cairo (JIT) 4.068 ± 0.026 4.027 4.109 1.00
head factorial_2M.cairo (AOT) 4.267 ± 0.029 4.234 4.331 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 3.822 ± 0.031 3.780 3.865 1.00
base fib_2M.cairo (AOT) 4.040 ± 0.042 3.987 4.101 1.06 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head fib_2M.cairo (JIT) 3.583 ± 0.023 3.549 3.610 1.00
head fib_2M.cairo (AOT) 3.817 ± 0.032 3.779 3.866 1.07 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 3.921 ± 0.040 3.874 3.994 1.00
base linear_search.cairo (AOT) 4.084 ± 0.036 4.045 4.152 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head linear_search.cairo (JIT) 3.813 ± 0.032 3.755 3.860 1.00
head linear_search.cairo (AOT) 3.935 ± 0.031 3.886 3.988 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 4.013 ± 0.046 3.962 4.114 1.00
base logistic_map.cairo (AOT) 4.075 ± 0.039 4.008 4.132 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head logistic_map.cairo (JIT) 3.919 ± 0.043 3.871 3.996 1.00
head logistic_map.cairo (AOT) 3.987 ± 0.020 3.964 4.030 1.02 ± 0.01

Copy link

github-actions bot commented Jan 16, 2025

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 20.842 ± 0.060 20.749 20.940 100.23 ± 3.23
cairo-native (embedded AOT) 4.048 ± 0.037 3.986 4.100 19.47 ± 0.65
cairo-native (embedded JIT using LLVM's ORC Engine) 3.835 ± 0.023 3.811 3.881 18.44 ± 0.60
cairo-native (standalone AOT with -march=native) 0.208 ± 0.007 0.199 0.219 1.00

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.808 ± 0.044 5.745 5.882 2964.41 ± 101.66
cairo-native (embedded AOT) 3.894 ± 0.020 3.871 3.935 1987.65 ± 67.27
cairo-native (embedded JIT using LLVM's ORC Engine) 3.733 ± 0.033 3.684 3.780 1905.12 ± 65.95
cairo-native (standalone AOT with -march=native) 0.002 ± 0.000 0.002 0.003 1.00

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.736 ± 0.089 14.571 14.839 10.86 ± 0.07
cairo-native (embedded AOT) 4.271 ± 0.023 4.238 4.309 3.15 ± 0.02
cairo-native (embedded JIT using LLVM's ORC Engine) 4.050 ± 0.017 4.027 4.084 2.99 ± 0.01
cairo-native (standalone AOT with -march=native) 1.357 ± 0.003 1.355 1.365 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.607 ± 0.050 14.538 14.688 181.88 ± 1.91
cairo-native (embedded AOT) 3.816 ± 0.030 3.787 3.881 47.52 ± 0.60
cairo-native (embedded JIT using LLVM's ORC Engine) 3.595 ± 0.020 3.571 3.626 44.77 ± 0.51
cairo-native (standalone AOT with -march=native) 0.080 ± 0.001 0.080 0.085 1.00

Benchmark for program linear_search

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.795 ± 0.044 5.723 5.851 2818.36 ± 115.89
cairo-native (embedded AOT) 3.930 ± 0.035 3.874 3.985 1911.36 ± 79.17
cairo-native (embedded JIT using LLVM's ORC Engine) 3.785 ± 0.023 3.746 3.823 1840.85 ± 75.28
cairo-native (standalone AOT with -march=native) 0.002 ± 0.000 0.002 0.003 1.00

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.721 ± 0.026 5.693 5.774 23.57 ± 0.11
cairo-native (embedded AOT) 3.980 ± 0.033 3.932 4.028 16.40 ± 0.14
cairo-native (embedded JIT using LLVM's ORC Engine) 3.912 ± 0.037 3.859 3.964 16.12 ± 0.15
cairo-native (standalone AOT with -march=native) 0.243 ± 0.000 0.242 0.243 1.00

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