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 47 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 now correctly formatted.

Copy link

github-actions bot commented Jan 16, 2025

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 3.859 ± 0.031 3.826 3.910 1.01 ± 0.01
base dict_insert.cairo (AOT) 3.838 ± 0.028 3.793 3.872 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 3.877 ± 0.021 3.855 3.927 1.02 ± 0.01
head dict_insert.cairo (AOT) 3.796 ± 0.017 3.769 3.820 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 3.762 ± 0.026 3.721 3.805 1.02 ± 0.01
base dict_snapshot.cairo (AOT) 3.675 ± 0.021 3.648 3.714 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 3.747 ± 0.021 3.717 3.771 1.03 ± 0.01
head dict_snapshot.cairo (AOT) 3.637 ± 0.020 3.602 3.668 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 4.129 ± 0.042 4.076 4.198 1.01 ± 0.01
base factorial_2M.cairo (AOT) 4.071 ± 0.035 4.026 4.160 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 4.074 ± 0.014 4.051 4.093 1.00 ± 0.01
head factorial_2M.cairo (AOT) 4.060 ± 0.023 4.033 4.097 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 3.674 ± 0.041 3.620 3.739 1.02 ± 0.01
base fib_2M.cairo (AOT) 3.606 ± 0.026 3.570 3.633 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 3.625 ± 0.021 3.597 3.653 1.01 ± 0.01
head fib_2M.cairo (AOT) 3.585 ± 0.018 3.562 3.618 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 3.843 ± 0.020 3.824 3.877 1.03 ± 0.01
base linear_search.cairo (AOT) 3.728 ± 0.027 3.696 3.776 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 3.818 ± 0.020 3.785 3.853 1.04 ± 0.01
head linear_search.cairo (AOT) 3.686 ± 0.014 3.667 3.713 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 3.997 ± 0.041 3.948 4.060 1.05 ± 0.01
base logistic_map.cairo (AOT) 3.809 ± 0.035 3.763 3.876 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 3.916 ± 0.026 3.858 3.943 1.04 ± 0.01
head logistic_map.cairo (AOT) 3.756 ± 0.018 3.728 3.782 1.00

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.746 ± 0.107 20.587 20.949 5.62 ± 0.05
cairo-native (embedded AOT) 3.688 ± 0.024 3.663 3.736 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.779 ± 0.038 3.737 3.844 1.02 ± 0.01

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.796 ± 0.085 5.678 5.900 1.58 ± 0.03
cairo-native (embedded AOT) 3.680 ± 0.031 3.610 3.719 1.00 ± 0.01
cairo-native (embedded JIT using LLVM's ORC Engine) 3.663 ± 0.038 3.611 3.729 1.00

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.409 ± 0.085 14.336 14.615 3.63 ± 0.03
cairo-native (embedded AOT) 3.973 ± 0.016 3.937 3.988 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 4.028 ± 0.038 3.975 4.115 1.01 ± 0.01

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.296 ± 0.113 14.049 14.450 4.05 ± 0.05
cairo-native (embedded AOT) 3.528 ± 0.029 3.493 3.575 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.535 ± 0.015 3.513 3.565 1.00 ± 0.01

Benchmark for program linear_search

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.722 ± 0.025 5.684 5.774 1.60 ± 0.01
cairo-native (embedded AOT) 3.587 ± 0.025 3.547 3.630 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.723 ± 0.017 3.691 3.746 1.04 ± 0.01

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.666 ± 0.036 5.608 5.714 1.54 ± 0.02
cairo-native (embedded AOT) 3.688 ± 0.028 3.646 3.739 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.826 ± 0.021 3.797 3.861 1.04 ± 0.01

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