refactor(sqrt): Make sqrt libfuncs runtime-bindings based.#1644
Conversation
Benchmarking resultsBenchmark for program
|
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.596 ± 0.085 | 10.521 | 10.788 | 5.95 ± 0.06 |
cairo-native (embedded AOT) |
1.781 ± 0.009 | 1.766 | 1.795 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1.791 ± 0.007 | 1.783 | 1.806 | 1.01 ± 0.01 |
Benchmark for program dict_snapshot
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
531.2 ± 3.5 | 527.4 | 539.1 | 1.00 |
cairo-native (embedded AOT) |
1600.5 ± 9.9 | 1590.3 | 1619.1 | 3.01 ± 0.03 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1615.6 ± 5.4 | 1602.4 | 1621.7 | 3.04 ± 0.02 |
Benchmark for program factorial_2M
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.624 ± 0.074 | 4.573 | 4.829 | 2.21 ± 0.04 |
cairo-native (embedded AOT) |
2.092 ± 0.012 | 2.079 | 2.119 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.110 ± 0.010 | 2.093 | 2.123 | 1.01 ± 0.01 |
Benchmark for program fib_2M
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.507 ± 0.048 | 4.471 | 4.633 | 2.82 ± 0.03 |
cairo-native (embedded AOT) |
1.596 ± 0.005 | 1.587 | 1.602 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1.633 ± 0.011 | 1.620 | 1.653 | 1.02 ± 0.01 |
Benchmark for program linear_search
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
568.3 ± 5.3 | 562.3 | 575.9 | 1.00 |
cairo-native (embedded AOT) |
1614.1 ± 7.6 | 1599.9 | 1621.6 | 2.84 ± 0.03 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1649.0 ± 4.9 | 1640.1 | 1654.1 | 2.90 ± 0.03 |
Benchmark for program logistic_map
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
488.0 ± 5.4 | 479.8 | 496.3 | 1.00 |
cairo-native (embedded AOT) |
1786.6 ± 24.0 | 1761.0 | 1834.5 | 3.66 ± 0.06 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1889.3 ± 6.7 | 1883.6 | 1903.5 | 3.87 ± 0.04 |
Benchmark results Main vs HEAD.Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
|
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 4 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on orizi).
src/metadata/runtime_bindings.rs line 1233 at r1 (raw file):
context: &'ctx Context, location: Location<'ctx>, func_symbol: &str,
func_symbol == sqrt_type.symbol()
can be removed from the parameters
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on orizi).
255c03a to
479a385
Compare
|
✅ Code is now correctly formatted. |
orizi
left a comment
There was a problem hiding this comment.
@orizi made 1 comment.
Reviewable status: 1 of 5 files reviewed, 1 unresolved discussion (waiting on TomerStarkware).
src/metadata/runtime_bindings.rs line 1233 at r1 (raw file):
Previously, TomerStarkware wrote…
func_symbol == sqrt_type.symbol()
can be removed from the parameters
Done.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
479a385 to
1261db5
Compare
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on orizi).
Refactor sqrt implementations to runtime.
Introduces Breaking Changes?
No.
This change is