-
Notifications
You must be signed in to change notification settings - Fork 49
[0.6.x] Fix BoundedInt is_zero libfunc #1467
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
base: v0.6
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.6 #1467 +/- ##
==========================================
+ Coverage 76.86% 76.97% +0.10%
==========================================
Files 111 111
Lines 26689 26716 +27
==========================================
+ Hits 20515 20564 +49
+ Misses 6174 6152 -22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JulianGCalderon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
src/libfuncs/bounded_int.rs
Outdated
| let k0 = if src_ty.is_bounded_int(registry)? { | ||
| // We can do the substraction since the lower bound of the bounded int will | ||
| // always be less or equal than 0. | ||
| entry.const_int_from_type(context, location, 0 - src_range.lower, src_value.r#type())? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just -src_range.lower?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in fcab1bb
fcab1bb
JulianGCalderon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Benchmark results Main vs HEAD.Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
|
Benchmarking resultsBenchmark for program
|
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
11.091 ± 0.092 | 11.011 | 11.296 | 4.51 ± 0.05 |
cairo-native (embedded AOT) |
2.461 ± 0.018 | 2.448 | 2.509 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.545 ± 0.014 | 2.528 | 2.571 | 1.03 ± 0.01 |
Benchmark for program dict_snapshot
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
521.5 ± 10.3 | 511.0 | 547.3 | 1.00 |
cairo-native (embedded AOT) |
2144.2 ± 16.7 | 2126.7 | 2184.8 | 4.11 ± 0.09 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2246.0 ± 10.2 | 2231.5 | 2262.3 | 4.31 ± 0.09 |
Benchmark for program factorial_2M
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.789 ± 0.008 | 4.777 | 4.799 | 1.86 ± 0.02 |
cairo-native (embedded AOT) |
2.577 ± 0.025 | 2.546 | 2.629 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.667 ± 0.096 | 2.596 | 2.824 | 1.03 ± 0.04 |
Benchmark for program fib_2M
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.741 ± 0.015 | 4.716 | 4.765 | 2.26 ± 0.01 |
cairo-native (embedded AOT) |
2.094 ± 0.011 | 2.079 | 2.106 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.141 ± 0.012 | 2.119 | 2.160 | 1.02 ± 0.01 |
Benchmark for program linear_search
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
563.0 ± 6.8 | 552.8 | 573.7 | 1.00 |
cairo-native (embedded AOT) |
2181.4 ± 14.3 | 2150.1 | 2208.3 | 3.87 ± 0.05 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2312.3 ± 10.2 | 2301.3 | 2332.0 | 4.11 ± 0.05 |
Benchmark for program logistic_map
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
375.5 ± 5.8 | 367.1 | 387.1 | 1.00 |
cairo-native (embedded AOT) |
2262.6 ± 24.8 | 2239.3 | 2321.3 | 6.03 ± 0.11 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2424.8 ± 11.5 | 2402.3 | 2439.9 | 6.46 ± 0.10 |
JulianGCalderon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fix BoundedInt is_zero libfunc
When using
bounded_int_is_zero()libfunc with bounded ints that had a lower bound different than 0, we were not taking into account the offset used so it was not working properly.Closes #NA
Introduces Breaking Changes?
Yes/No.
starknet-blocks.ymlworkflow to use these PRs.These PRs should be merged after this one right away, in that order.
Checklist