Skip to content

FFI: canonicalize array, data pointer for primitives#8665

Merged
myrrc merged 1 commit into
developfrom
myrrc/ffi-additive
Jul 7, 2026
Merged

FFI: canonicalize array, data pointer for primitives#8665
myrrc merged 1 commit into
developfrom
myrrc/ffi-additive

Conversation

@myrrc

@myrrc myrrc commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
  • Add canonicalize function for vx_array.
  • Add data_ptr functions for canonicalized primitive and bool arrays.
  • Add sink abort method which doesn't write file footer and leaves file invalid. Semantics here is we want to abort the sink in C++ destructor - if user hasn't called Finalize(), file will not be written correctly.
  • Expose Rust's error code to FFI.

@myrrc myrrc requested a review from 0ax1 July 7, 2026 09:28
@myrrc myrrc added changelog/feature A new feature lang/c Relates to the Vortex C (FFI) API labels Jul 7, 2026
@myrrc myrrc enabled auto-merge (squash) July 7, 2026 09:28
@codspeed-hq

codspeed-hq Bot commented Jul 7, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 19.13%

⚡ 5 improved benchmarks
❌ 1 regressed benchmark
✅ 1601 untouched benchmarks
⏩ 42 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation chunked_varbinview_canonical_into[(1000, 10)] 154.7 µs 190.5 µs -18.81%
Simulation chunked_bool_canonical_into[(1000, 10)] 26.2 µs 16.1 µs +62.81%
Simulation bitwise_not_vortex_buffer_mut[128] 273.6 ns 215.3 ns +27.1%
Simulation chunked_varbinview_into_canonical[(1000, 10)] 205.9 µs 169.8 µs +21.26%
Simulation bitwise_not_vortex_buffer_mut[1024] 333.9 ns 275.6 ns +21.17%
Simulation bitwise_not_vortex_buffer_mut[2048] 427.8 ns 369.4 ns +15.79%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing myrrc/ffi-additive (2002439) with develop (8f72595)

Open in CodSpeed

Footnotes

  1. 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.

@0ax1 0ax1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits and questions

Comment thread vortex-ffi/cinclude/vortex.h
Comment thread vortex-ffi/cinclude/vortex.h Outdated
Comment thread vortex-ffi/cinclude/vortex.h
Comment thread vortex-ffi/cinclude/vortex.h Outdated
Comment thread vortex-ffi/cinclude/vortex.h
Comment thread vortex-ffi/cinclude/vortex.h Outdated
Comment thread vortex-ffi/src/array.rs
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
@myrrc myrrc force-pushed the myrrc/ffi-additive branch from cf3f467 to 2002439 Compare July 7, 2026 11:18
@myrrc myrrc requested a review from 0ax1 July 7, 2026 11:19
@myrrc myrrc merged commit 40cb396 into develop Jul 7, 2026
69 of 71 checks passed
@myrrc myrrc deleted the myrrc/ffi-additive branch July 7, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature lang/c Relates to the Vortex C (FFI) API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants