-
Notifications
You must be signed in to change notification settings - Fork 44
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
fix runtime version check #1029
Conversation
✅ Code is now correctly formatted. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1029 +/- ##
=======================================
Coverage 80.88% 80.88%
=======================================
Files 107 107
Lines 29470 29470
=======================================
Hits 23836 23836
Misses 5634 5634 ☔ View full report in Codecov by Sentry. |
Benchmark results Main vs HEAD.
|
Benchmarking resultsBenchmark for program
|
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
20.927 ± 0.194 | 20.634 | 21.227 | 97.74 ± 3.20 |
cairo-native (embedded AOT) |
3.993 ± 0.029 | 3.959 | 4.062 | 18.65 ± 0.60 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.837 ± 0.068 | 3.766 | 3.954 | 17.92 ± 0.65 |
cairo-native (standalone AOT with -march=native) |
0.214 ± 0.007 | 0.206 | 0.228 | 1.00 |
Benchmark for program dict_snapshot
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
5.810 ± 0.036 | 5.758 | 5.865 | 18.32 ± 0.13 |
cairo-native (embedded AOT) |
4.167 ± 0.032 | 4.118 | 4.236 | 13.14 ± 0.11 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
4.090 ± 0.054 | 4.035 | 4.199 | 12.90 ± 0.18 |
cairo-native (standalone AOT with -march=native) |
0.317 ± 0.001 | 0.316 | 0.319 | 1.00 |
Benchmark for program factorial_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
14.850 ± 0.108 | 14.696 | 15.080 | 10.94 ± 0.08 |
cairo-native (embedded AOT) |
4.270 ± 0.031 | 4.234 | 4.334 | 3.14 ± 0.02 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
4.168 ± 0.057 | 4.105 | 4.303 | 3.07 ± 0.04 |
cairo-native (standalone AOT with -march=native) |
1.358 ± 0.001 | 1.356 | 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.724 ± 0.076 | 14.597 | 14.853 | 183.29 ± 2.39 |
cairo-native (embedded AOT) |
3.802 ± 0.041 | 3.768 | 3.899 | 47.32 ± 0.76 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.733 ± 0.058 | 3.639 | 3.799 | 46.47 ± 0.91 |
cairo-native (standalone AOT with -march=native) |
0.080 ± 0.001 | 0.080 | 0.084 | 1.00 |
Benchmark for program linear_search
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
5.816 ± 0.023 | 5.778 | 5.843 | 2875.25 ± 61.51 |
cairo-native (embedded AOT) |
3.842 ± 0.018 | 3.808 | 3.868 | 1899.45 ± 40.88 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.782 ± 0.046 | 3.711 | 3.848 | 1869.75 ± 45.38 |
cairo-native (standalone AOT with -march=native) |
0.002 ± 0.000 | 0.002 | 0.002 | 1.00 |
Benchmark for program logistic_map
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
5.761 ± 0.032 | 5.690 | 5.799 | 23.75 ± 0.14 |
cairo-native (embedded AOT) |
4.023 ± 0.034 | 3.976 | 4.090 | 16.58 ± 0.14 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.928 ± 0.027 | 3.886 | 3.964 | 16.19 ± 0.11 |
cairo-native (standalone AOT with -march=native) |
0.243 ± 0.000 | 0.242 | 0.244 | 1.00 |
The The condition The only thing that needs to be changed is the |
Oh, you are right. I removed the '\0' in the previous approach, which was using a buffer with the same length as |
When checking the runtime's version, it occurs that version's buffer does not have the same size as the target buffer. Due to this, the function
copy_from_slice
fails when trying to copy the contents of the version's buffer into the target's oneChecklist