Move optimizer kernels into a dedicated KernelSession#8511
Conversation
Kernels previously lived inside ArraySession. Move them into a new KernelSession session variable that owns the ArrayKernels registry, following the existing *Session pattern (ScalarFnSession, DTypeSession). KernelSession::default() self-populates the built-in parent-reduce and execute-parent kernels. ArraySession::default() now registers only encodings; the kernel accessors (ArrayKernelsExt::kernels/kernels_opt) resolve through KernelSession, and ArrayKernels is no longer a standalone session variable. All default session builders (array_session/LEGACY_SESSION, vortex::VortexSession::default, vortex-ipc, kleene bench) now install KernelSession. Signed-off-by: Nicholas Gates <nick@spiraldb.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Polar Signals Profiling ResultsLatest Run
Previous Runs (1)
Powered by Polar Signals Cloud |
Benchmarks: PolarSignals ProfilingVortex (geomean): 0.891x ✅ How to read Verdict and Engines
datafusion / vortex-file-compressed (0.891x ✅, 5↑ 0↓)
No file size changes detected. |
Benchmarks: FineWeb NVMeVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.960x ➖, 3↑ 1↓)
datafusion / vortex-compact (0.965x ➖, 0↑ 0↓)
datafusion / parquet (0.925x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed (0.925x ➖, 1↑ 0↓)
duckdb / vortex-compact (0.966x ➖, 0↑ 0↓)
duckdb / parquet (0.937x ➖, 1↑ 0↓)
File Size Changes (1 files changed, -0.0% overall, 0↑ 1↓)
Totals:
|
Benchmarks: TPC-H SF=1 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.005x ➖, 0↑ 0↓)
datafusion / vortex-compact (1.019x ➖, 0↑ 0↓)
datafusion / parquet (1.025x ➖, 0↑ 4↓)
datafusion / arrow (1.010x ➖, 0↑ 1↓)
duckdb / vortex-file-compressed (1.015x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.008x ➖, 0↑ 0↓)
duckdb / parquet (1.014x ➖, 0↑ 1↓)
duckdb / duckdb (1.006x ➖, 0↑ 0↓)
File Size Changes (10 files changed, -0.3% overall, 3↑ 7↓)
Totals:
|
Benchmarks: TPC-DS SF=1 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.983x ➖, 2↑ 5↓)
datafusion / vortex-compact (1.020x ➖, 1↑ 5↓)
datafusion / parquet (0.991x ➖, 2↑ 1↓)
duckdb / vortex-file-compressed (0.990x ➖, 3↑ 1↓)
duckdb / vortex-compact (1.007x ➖, 2↑ 2↓)
duckdb / parquet (1.018x ➖, 0↑ 3↓)
duckdb / duckdb (1.014x ➖, 0↑ 2↓)
File Size Changes (6 files changed, -0.0% overall, 1↑ 5↓)
Totals:
|
Benchmarks: FineWeb S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.914x ➖, 1↑ 0↓)
datafusion / vortex-compact (0.957x ➖, 1↑ 0↓)
datafusion / parquet (0.879x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (0.925x ➖, 1↑ 0↓)
duckdb / vortex-compact (0.867x ➖, 1↑ 0↓)
duckdb / parquet (0.978x ➖, 0↑ 0↓)
|
Benchmarks: Statistical and Population GeneticsVerdict: No clear signal (low confidence) How to read Verdict and Engines
duckdb / vortex-file-compressed (1.008x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.001x ➖, 0↑ 0↓)
duckdb / parquet (0.995x ➖, 0↑ 0↓)
File Size Changes (1 files changed, +0.0% overall, 1↑ 0↓)
Totals:
|
Benchmarks: TPC-H SF=10 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.047x ➖, 0↑ 0↓)
datafusion / vortex-compact (1.042x ➖, 0↑ 1↓)
datafusion / parquet (1.044x ➖, 0↑ 0↓)
datafusion / arrow (1.059x ➖, 0↑ 2↓)
duckdb / vortex-file-compressed (1.042x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.033x ➖, 0↑ 0↓)
duckdb / parquet (1.024x ➖, 0↑ 0↓)
duckdb / duckdb (1.023x ➖, 0↑ 0↓)
File Size Changes (26 files changed, +0.0% overall, 12↑ 14↓)
Totals:
|
Benchmarks: Random AccessVortex (geomean): 0.928x ➖ How to read Verdict and Engines
unknown / unknown (0.952x ➖, 8↑ 0↓)
|
Benchmarks: Clickbench on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.161x ❌, 0↑ 36↓)
datafusion / parquet (1.137x ❌, 0↑ 35↓)
duckdb / vortex-file-compressed (1.102x ❌, 0↑ 26↓)
duckdb / parquet (1.100x ❌, 0↑ 26↓)
duckdb / duckdb (1.096x ➖, 0↑ 24↓)
File Size Changes (106 files changed, +0.0% overall, 52↑ 54↓)
Totals:
|
Benchmarks: TPC-H SF=1 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.746x ➖, 7↑ 0↓)
datafusion / vortex-compact (0.889x ➖, 4↑ 0↓)
datafusion / parquet (0.803x ➖, 8↑ 1↓)
duckdb / vortex-file-compressed (1.001x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.058x ➖, 0↑ 1↓)
duckdb / parquet (0.983x ➖, 0↑ 1↓)
|
Merging this PR will not alter performance
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | decompress_rd[f64, (10000, 0.01)] |
108.9 µs | 125.8 µs | -13.43% |
| ❌ | Simulation | decompress_rd[f64, (10000, 0.0)] |
108.9 µs | 125.8 µs | -13.41% |
| ❌ | Simulation | decompress_rd[f64, (10000, 0.1)] |
109.2 µs | 126 µs | -13.34% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[128] |
244.4 ns | 186.1 ns | +31.34% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[1024] |
304.7 ns | 246.4 ns | +23.68% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(1000, 10)] |
190.7 µs | 155.1 µs | +23% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
205.6 µs | 170 µs | +20.94% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[2048] |
427.8 ns | 369.4 ns | +15.79% |
| ⚡ | Simulation | decompress_rd[f64, (100000, 0.1)] |
1,020.9 µs | 887.1 µs | +15.08% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ngates/kernels (c4dc50c) with develop (9814173)
Benchmarks: Appian on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.013x ➖, 0↑ 0↓)
datafusion / parquet (0.995x ➖, 0↑ 1↓)
duckdb / vortex-file-compressed (0.974x ➖, 0↑ 0↓)
duckdb / parquet (0.983x ➖, 0↑ 0↓)
duckdb / duckdb (0.986x ➖, 0↑ 0↓)
File Size Changes (3 files changed, -0.0% overall, 1↑ 2↓)
Totals:
|
Benchmarks: CompressionVortex (geomean): 1.004x ➖ How to read Verdict and Engines
unknown / unknown (1.007x ➖, 2↑ 3↓)
|
|
TPC-H doesn't seem improved? I'll follow up next week, maybe there's an encoding mismatch somewhere |
Benchmarks: TPC-H SF=10 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.777x ➖, 6↑ 0↓)
datafusion / vortex-compact (0.761x ➖, 7↑ 0↓)
datafusion / parquet (0.972x ➖, 1↑ 2↓)
duckdb / vortex-file-compressed (0.857x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.860x ➖, 1↑ 0↓)
duckdb / parquet (0.776x ➖, 4↑ 0↓)
|
|
so what's the final form? Kernel under Array or stand alone? |
|
Final form is standalone. I realised we already have ScalarFn and AggregateFnSession anyway in this crate. This doesn't fix the TPC-H query. That's hopefully this one #8514 ! |
I half moved kernels from KernelSession to ArraySession. I didn't fully undo that move.