Skip to content

Expose array buffer replacement#8606

Merged
gatesn merged 1 commit into
developfrom
ngates/with-buffers
Jun 29, 2026
Merged

Expose array buffer replacement#8606
gatesn merged 1 commit into
developfrom
ngates/with-buffers

Conversation

@gatesn

@gatesn gatesn commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

I want to move array buffers between devices, but keep the same array tree.

@gatesn gatesn requested a review from a team June 26, 2026 16:41
Comment thread vortex-array/src/array/mod.rs Outdated
@codspeed-hq

codspeed-hq Bot commented Jun 26, 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.

⚡ 4 improved benchmarks
❌ 3 regressed benchmarks
✅ 1588 untouched benchmarks
⏩ 4 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime cuda/bitpacked_u8/unpack/3bw[100M] 299.6 µs 353.9 µs -15.33%
Simulation compact_sliced[(4096, 90)] 750 ns 866.7 ns -13.46%
Simulation encode_varbin[(1000, 32)] 145.4 µs 164.3 µs -11.48%
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 bitwise_not_vortex_buffer_mut[2048] 398.6 ns 340.3 ns +17.14%
Simulation rebuild_naive 109 µs 98.8 µs +10.38%

Tip

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


Comparing ngates/with-buffers (9c2d3e1) with develop (bf2be52)

Open in CodSpeed

Footnotes

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

@gatesn gatesn force-pushed the ngates/with-buffers branch 2 times, most recently from d9b669d to 75dfba6 Compare June 26, 2026 17:19
@gatesn gatesn added the changelog/feature A new feature label Jun 26, 2026
@gatesn gatesn force-pushed the ngates/with-buffers branch from 75dfba6 to 86443c3 Compare June 26, 2026 17:32
@gatesn gatesn enabled auto-merge (squash) June 26, 2026 18:38
Signed-off-by: "Nicholas Gates" <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
@gatesn gatesn force-pushed the ngates/with-buffers branch from 86443c3 to 9c2d3e1 Compare June 28, 2026 15:33
array: ArrayView<'_, Self>,
buffers: &[BufferHandle],
) -> VortexResult<ArrayParts<Self>> {
vortex_array::vtable::with_empty_buffers(self, array, buffers)

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.

don't quite get this? It's just so you can add the method and assert that it panics?

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.

ok no there are some implementations, I thought everything is this

}
}

fn with_buffers(

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.

Shouldn't this be truly with_buffers just like with slots? Try to mutate in place and only make a copy if it fails? Then we cannot take view but typed Array

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

we can add unchecked variants later

@gatesn gatesn merged commit 1e689a1 into develop Jun 29, 2026
93 of 94 checks passed
@gatesn gatesn deleted the ngates/with-buffers branch June 29, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants