Skip to content

[don't merge] New C++ api#8651

Closed
myrrc wants to merge 1 commit into
developfrom
myrrc/cxx2
Closed

[don't merge] New C++ api#8651
myrrc wants to merge 1 commit into
developfrom
myrrc/cxx2

Conversation

@myrrc

@myrrc myrrc commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
  • Replace C++ api with a new one which depends on vortex-ffi.
  • Remove cxx crate from workspace.
  • Port FFI examples and tests to C++ examples as tests.
  • Add a reader/writer guide for C++ api.
  • Run C++ tests with ASAN and run examples in CI.

Depends: #8735

@myrrc myrrc added the changelog/break A breaking API change label Jul 3, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 8 improved benchmarks
❌ 5 regressed benchmarks
✅ 1693 untouched benchmarks

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 µs 191.2 µs -19.44%
Simulation encode_varbin[(1000, 4)] 139 µs 157.7 µs -11.81%
Simulation chunked_varbinview_into_canonical[(100, 100)] 271.6 µs 306.7 µs -11.46%
Simulation encode_varbin[(1000, 8)] 139.9 µs 157.6 µs -11.27%
Simulation encode_varbin[(1000, 2)] 138.5 µs 154.7 µs -10.46%
Simulation chunked_bool_canonical_into[(1000, 10)] 26.5 µs 16.2 µs +63.99%
Simulation chunked_varbinview_into_canonical[(1000, 10)] 205.7 µs 169.5 µs +21.36%
Simulation chunked_varbinview_opt_canonical_into[(1000, 10)] 205.8 µs 169.8 µs +21.2%
Simulation chunked_varbinview_opt_into_canonical[(1000, 10)] 219.5 µs 183.3 µs +19.76%
Simulation chunked_varbinview_canonical_into[(100, 100)] 258.5 µs 223.6 µs +15.61%
Simulation bitwise_not_vortex_buffer_mut[128] 244.4 ns 215.3 ns +13.55%
Simulation compare_int_constant 298.7 µs 268.7 µs +11.18%
Simulation bitwise_not_vortex_buffer_mut[1024] 304.7 ns 275.6 ns +10.58%

Tip

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


Comparing myrrc/cxx2 (0da0ff4) with develop (452e0f8)1

Open in CodSpeed

Footnotes

  1. No successful run was found on develop (a6513a0) during the generation of this report, so 452e0f8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@myrrc myrrc force-pushed the myrrc/cxx2 branch 2 times, most recently from 05babc3 to 5795c45 Compare July 3, 2026 16:35
@myrrc myrrc requested a review from 0ax1 July 3, 2026 16:47
@myrrc myrrc force-pushed the myrrc/cxx2 branch 2 times, most recently from a044015 to a5c7567 Compare July 3, 2026 16:56
@myrrc myrrc added the lang/cpp Relates to the Vortex C++ API label Jul 7, 2026
@myrrc myrrc force-pushed the myrrc/cxx2 branch 8 times, most recently from 66bfb31 to de2512a Compare July 8, 2026 14:07

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

first pass

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread vortex-cxx/vortex.hpp Outdated
Comment thread vortex-cxx/.clang-format Outdated
Comment thread vortex-cxx/CMakeLists.txt
Comment thread vortex-cxx/vortex.hpp Outdated
Comment thread vortex-cxx/vortex.hpp Outdated
Comment thread vortex-cxx/vortex.hpp Outdated
Comment thread vortex-cxx/vortex.hpp Outdated
Comment thread vortex-cxx/vortex.hpp Outdated
@vortex-data vortex-data deleted a comment from github-actions Bot Jul 8, 2026

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

second pass

Comment thread vortex-cxx/examples/.clang-tidy
Comment thread vortex-cxx/examples/dtype.cpp
Comment thread vortex-cxx/examples/hello-vortex.cpp Outdated
Comment thread vortex-cxx/tests/CMakeLists.txt
Comment thread vortex-cxx/tests/common.hpp
Comment thread vortex-cxx/vortex.cpp Outdated
Comment thread vortex-cxx/vortex.cpp Outdated
}

void StructArrayBuilder::Deleter::operator()(
vx_struct_column_builder* ptr) const noexcept {

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.

What's our rule of thumb for sprinkling noexcept?

Comment thread vortex-cxx/vortex.cpp Outdated
Comment thread vortex-cxx/vortex.cpp Outdated
}
session_ = std::move(other.session_);
stream_ = other.stream_;
other.stream_ = ArrowArrayStream{};

@0ax1 0ax1 Jul 8, 2026

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.

Also here we do why change other? other.stream_ = ArrowArrayStream{};

Comment thread vortex-cxx/vortex.hpp Outdated
@myrrc myrrc requested a review from 0ax1 July 10, 2026 14:19
@myrrc myrrc marked this pull request as ready for review July 10, 2026 14:49
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread docs/api/cpp/index.rst Outdated
Comment thread vortex-cxx/include/vortex/array.hpp Outdated
Comment thread vortex-cxx/include/vortex/array.hpp Outdated
Comment thread vortex-cxx/include/vortex/array.hpp
Comment thread vortex-cxx/include/vortex/array.hpp
Comment thread vortex-cxx/include/vortex/common.hpp Outdated
@vortex-data vortex-data deleted a comment from github-actions Bot Jul 13, 2026
@vortex-data vortex-data deleted a comment from github-actions Bot Jul 13, 2026
@vortex-data vortex-data deleted a comment from github-actions Bot Jul 13, 2026
@myrrc myrrc force-pushed the myrrc/cxx2 branch 2 times, most recently from f8fdfa0 to 63f5efa Compare July 13, 2026 12:20
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
@myrrc myrrc changed the title New C++ api [don't merge] New C++ api Jul 13, 2026
@myrrc myrrc closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change lang/cpp Relates to the Vortex C++ API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants