Replace ToCanonical trait usages with execute#8609
Conversation
Merging this PR will degrade performance by 10.5%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | extend_from_array_zctl[(1000, 8)] |
239.6 µs | 409.6 µs | -41.51% |
| ❌ | Simulation | extend_from_array_non_zctl_overlapping[(1000, 8)] |
272.2 µs | 444.7 µs | -38.79% |
| ❌ | Simulation | extend_from_array_non_zctl_overlapping[(1000, 32)] |
737.7 µs | 909.8 µs | -18.92% |
| ❌ | Simulation | compact_sliced[(4096, 90)] |
750 ns | 896.4 ns | -16.33% |
| ❌ | Simulation | extend_from_array_zctl[(1000, 64)] |
1 ms | 1.2 ms | -13.98% |
| ❌ | Simulation | compact_sliced[(16384, 90)] |
813.3 ns | 930.6 ns | -12.6% |
| ❌ | Simulation | sum_i32_nullable_all_valid |
37.2 µs | 42.1 µs | -11.76% |
| ❌ | Simulation | extend_from_array_zctl[(10000, 8)] |
1.9 ms | 2.2 ms | -10.8% |
| ❌ | Simulation | encode_varbin[(1000, 2)] |
141.5 µs | 158.4 µs | -10.67% |
| ❌ | Simulation | encode_varbin[(1000, 4)] |
142.4 µs | 159.2 µs | -10.6% |
| ❌ | Simulation | extend_from_array_non_zctl_overlapping[(10000, 8)] |
2.2 ms | 2.5 ms | -10.57% |
| ❌ | Simulation | encode_varbin[(1000, 8)] |
143.9 µs | 160.7 µs | -10.44% |
| ❌ | Simulation | chunked_varbinview_opt_canonical_into[(100, 100)] |
305.7 µs | 340.5 µs | -10.22% |
| ❌ | Simulation | encode_varbin[(1000, 32)] |
147.8 µs | 164.5 µs | -10.17% |
| ⚡ | Simulation | bench_many_codes_few_values[1024] |
538.9 µs | 363.9 µs | +48.07% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(1000, 10)] |
191.1 µs | 154.7 µs | +23.48% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[128] |
273.6 ns | 244.4 ns | +11.93% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/nice-hypatia-g68zgt (f3bf498) with develop (4959939)
Footnotes
-
42 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
5e975ca to
f8f6a90
Compare
048b19b to
947a966
Compare
Rebased onto develop and made standalone (no longer stacked on #8609). Instead of deprecating the hidden global session, expose it as `vortex_array::legacy_session()` and add it to the central `clippy.toml` `disallowed-methods` list (denied via `clippy::all`). New call sites are now rejected by clippy; every current invocation is explicitly allowlisted with `#[allow(clippy::disallowed_methods)]` on its enclosing function. - `LEGACY_SESSION` static -> `legacy_session() -> &'static VortexSession` (the `LazyLock` is now a private static inside the accessor). - All call sites renamed and allowlisted across vortex-array, the encodings, vortex-ffi, vortex-cuda, vortex-cxx, vortex-layout, vortex-python and vortex-web. develop has more call sites than #8609 (incl. test/builder code and crates #8609 had refactored away), all covered. Verified with: - cargo clippy -p vortex-array -p vortex-alp -p vortex-runend -p vortex-fsst -p vortex-fastlanes -p vortex-zstd -p vortex-ffi -p vortex-layout -p vortex-web-wasm -p vortex-cxx -p vortex-python --all-targets --all-features (0 disallowed-method hits, 0 warnings) - cargo +nightly fmt --check (touched crates) vortex-cuda could not be compiled here (CUDA toolchain unavailable); its two call sites are allowlisted following the same pattern. Signed-off-by: Robert Kruszewski <robert@spiraldb.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018E5DywGCpq26ndoMHd1vyg
bc088d1 to
d2f276a
Compare
Rebased onto develop and made standalone (no longer stacked on #8609). Instead of deprecating the hidden global session, expose it as `vortex_array::legacy_session()` and add it to the central `clippy.toml` `disallowed-methods` list (denied via `clippy::all`). New call sites are now rejected by clippy; every current invocation is explicitly allowlisted with `#[allow(clippy::disallowed_methods)]` on its enclosing function. - `LEGACY_SESSION` static -> `legacy_session() -> &'static VortexSession` (the `LazyLock` is now a private static inside the accessor). - All call sites renamed and allowlisted across vortex-array, the encodings, vortex-ffi, vortex-cuda, vortex-cxx, vortex-layout, vortex-python and vortex-web. develop has more call sites than #8609 (incl. test/builder code and crates #8609 had refactored away), all covered. Verified with: - cargo clippy -p vortex-array -p vortex-alp -p vortex-runend -p vortex-fsst -p vortex-fastlanes -p vortex-zstd -p vortex-ffi -p vortex-layout -p vortex-web-wasm -p vortex-cxx -p vortex-python --all-targets --all-features (0 disallowed-method hits, 0 warnings) - cargo +nightly fmt --check (touched crates) vortex-cuda could not be compiled here (CUDA toolchain unavailable); its two call sites are allowlisted following the same pattern. Signed-off-by: Robert Kruszewski <robert@spiraldb.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018E5DywGCpq26ndoMHd1vyg Signed-off-by: Robert Kruszewski <github@robertk.io>
|
@codex please review this change |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de998866cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
08472bb to
0871721
Compare
0871721 to
53ed496
Compare
This also removes ArrayBuilder::extend_from_array and moves that logic in to ArrayRef::append_to_builder Plumb ExecutionCtx through more methods instead of creating fresh one. Signed-off-by: Robert Kruszewski <github@robertk.io>
Replace the ListBuilder/ListViewBuilder downcast-enumeration macros with two dyn-dispatched ArrayBuilder methods, append_list_array and append_listview_array, taking ArrayViews. The builders resolve their own offset/size generics, so every IntegerPType (signed included) works, and either list encoding can append into either list builder. List-encoded sources now append directly from the ListArray layout without canonicalizing to ListViewArray first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Robert Kruszewski <github@robertk.io>
53ed496 to
f3bf498
Compare
|
@codex review again pls |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Seems like this improves polarsignals benchmark by a huge amount? Is that real? |
|
I think it is real. We have sometimes not delegated through VTable::append_to_builder which this pr fixes. I didn't know about this bug until we hit it elsewhere |
This also removes ArrayBuilder::extend_from_array and moves that logic
in to ArrayRef::append_to_builder
Plumb ExecutionCtx through more methods instead of creating fresh one.
Fixes: #3235
Signed-off-by: Robert Kruszewski github@robertk.io