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

Add managed allocator. #1054

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

Add managed allocator. #1054

wants to merge 5 commits into from

Conversation

azteca1998
Copy link
Collaborator

Checklist

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

Copy link

Benchmark results Main vs HEAD.

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 3.935 ± 0.054 3.862 4.014 1.00
base dict_insert.cairo (AOT) 4.137 ± 0.065 4.090 4.315 1.05 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head dict_insert.cairo (JIT) 3.829 ± 0.039 3.786 3.922 1.00
head dict_insert.cairo (AOT) 4.010 ± 0.030 3.961 4.053 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 3.793 ± 0.081 3.708 3.923 1.00
base dict_snapshot.cairo (AOT) 3.921 ± 0.056 3.829 4.012 1.03 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head dict_snapshot.cairo (JIT) 3.691 ± 0.042 3.645 3.800 1.00
head dict_snapshot.cairo (AOT) 3.881 ± 0.041 3.822 3.958 1.05 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 4.208 ± 0.072 4.090 4.306 1.00
base factorial_2M.cairo (AOT) 4.365 ± 0.076 4.280 4.509 1.04 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head factorial_2M.cairo (JIT) 4.098 ± 0.042 4.044 4.178 1.00
head factorial_2M.cairo (AOT) 4.291 ± 0.033 4.240 4.344 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 3.756 ± 0.068 3.674 3.845 1.00
base fib_2M.cairo (AOT) 3.822 ± 0.028 3.780 3.869 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head fib_2M.cairo (JIT) 3.624 ± 0.014 3.599 3.646 1.00
head fib_2M.cairo (AOT) 3.831 ± 0.024 3.792 3.856 1.06 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 3.938 ± 0.083 3.846 4.108 1.00
base linear_search.cairo (AOT) 3.964 ± 0.069 3.867 4.086 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head linear_search.cairo (JIT) 3.799 ± 0.035 3.749 3.847 1.00
head linear_search.cairo (AOT) 3.911 ± 0.031 3.857 3.955 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 4.037 ± 0.082 3.933 4.189 1.01 ± 0.02
base logistic_map.cairo (AOT) 3.995 ± 0.036 3.957 4.070 1.00
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head logistic_map.cairo (JIT) 3.911 ± 0.042 3.836 3.953 1.00
head logistic_map.cairo (AOT) 3.997 ± 0.039 3.962 4.067 1.02 ± 0.01

Copy link

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 20.922 ± 0.060 20.847 21.028 106.49 ± 1.16
cairo-native (embedded AOT) 4.008 ± 0.027 3.969 4.067 20.40 ± 0.25
cairo-native (embedded JIT using LLVM's ORC Engine) 3.872 ± 0.030 3.840 3.929 19.71 ± 0.26
cairo-native (standalone AOT with -march=native) 0.196 ± 0.002 0.194 0.201 1.00

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.859 ± 0.075 5.778 5.979 2991.06 ± 78.20
cairo-native (embedded AOT) 3.933 ± 0.051 3.878 4.036 2008.09 ± 52.66
cairo-native (embedded JIT using LLVM's ORC Engine) 3.735 ± 0.037 3.687 3.772 1907.00 ± 47.39
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.817 ± 0.075 14.739 15.010 10.93 ± 0.06
cairo-native (embedded AOT) 4.322 ± 0.060 4.260 4.434 3.19 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 4.095 ± 0.039 4.034 4.168 3.02 ± 0.03
cairo-native (standalone AOT with -march=native) 1.356 ± 0.002 1.354 1.359 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.725 ± 0.109 14.486 14.929 183.60 ± 1.54
cairo-native (embedded AOT) 3.821 ± 0.049 3.767 3.905 47.64 ± 0.64
cairo-native (embedded JIT using LLVM's ORC Engine) 3.598 ± 0.023 3.558 3.635 44.86 ± 0.33
cairo-native (standalone AOT with -march=native) 0.080 ± 0.000 0.080 0.081 1.00

Benchmark for program linear_search

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.815 ± 0.046 5.767 5.915 2840.98 ± 64.29
cairo-native (embedded AOT) 3.878 ± 0.018 3.850 3.906 1894.71 ± 41.10
cairo-native (embedded JIT using LLVM's ORC Engine) 3.771 ± 0.034 3.739 3.862 1842.43 ± 42.50
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.702 ± 0.020 5.670 5.732 23.55 ± 0.09
cairo-native (embedded AOT) 3.968 ± 0.020 3.937 3.999 16.39 ± 0.08
cairo-native (embedded JIT using LLVM's ORC Engine) 3.903 ± 0.047 3.846 3.982 16.12 ± 0.19
cairo-native (standalone AOT with -march=native) 0.242 ± 0.000 0.242 0.242 1.00

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 37.67123% with 91 lines in your changes missing coverage. Please review.

Project coverage is 80.73%. Comparing base (a6ddeee) to head (2c4dab7).

Files with missing lines Patch % Lines
src/utils/allocator.rs 19.35% 50 Missing ⚠️
src/utils/safe_runner.rs 33.87% 41 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1054      +/-   ##
==========================================
- Coverage   80.95%   80.73%   -0.23%     
==========================================
  Files         108      110       +2     
  Lines       29938    30068     +130     
==========================================
+ Hits        24237    24276      +39     
- Misses       5701     5792      +91     

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

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