codegen only used functions in duckdb C API#8491
Conversation
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Merging this PR will not alter performance
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | chunked_varbinview_canonical_into[(1000, 10)] |
162.1 µs | 198.6 µs | -18.39% |
| ❌ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
178.2 µs | 214.7 µs | -17.01% |
| ❌ | Simulation | chunked_varbinview_canonical_into[(100, 100)] |
274 µs | 308.4 µs | -11.15% |
| ⚡ | Simulation | chunked_varbinview_opt_canonical_into[(1000, 10)] |
214.7 µs | 177.8 µs | +20.8% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[128] |
215.3 ns | 186.1 ns | +15.67% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[1024] |
275.6 ns | 246.4 ns | +11.84% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing myrrc/duckdb-api-codegen (4955ddd) with develop (202953d)
Footnotes
-
3 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. ↩
| extern "C" { | ||
| #endif // __cplusplus | ||
|
|
||
| /** |
There was a problem hiding this comment.
How come these are dropped and why?
There was a problem hiding this comment.
We had had a double check: one in cbingden option, other in header/trailer. I've removed the hand-written one.
|
|
||
| // Duckdb C API function we use. | ||
| // This lowers codegen'd src/cpp.rs by four times. | ||
| const DUCKDB_C_API_FUNCTIONS: [&str; 134] = [ |
There was a problem hiding this comment.
The binary gets smaller but also all API is now hidden behind having to change the build.rs when not exposed explicitly.
There was a problem hiding this comment.
If you want to extend Rust API, you still likely need to look into duckdb.h/.hpp, and you need to write a Rust wrapper over Rust unsafe {} functions, so we're not losing anything here.
0ax1
left a comment
There was a problem hiding this comment.
Seems a bit tedious to maintain a custom list, but alright let's try this in practice.
Make duckdb-vortex compilation slightly faster Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
Make duckdb-vortex compilation slightly faster