Skip to content

Conversation

@AdamGS
Copy link
Contributor

@AdamGS AdamGS commented Sep 24, 2025

Saves on many re-allocations of the data buffer in the builder.

@AdamGS AdamGS added the changelog/performance A performance improvement label Sep 24, 2025
@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.56%. Comparing base (ca28428) to head (2e90821).
⚠️ Report is 6 commits behind head on develop.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AdamGS AdamGS force-pushed the adamg/pre-allocate-var-bin-take-data branch from 6193a26 to c374349 Compare September 24, 2025 18:22
AdamGS added a commit that referenced this pull request Sep 24, 2025
Sets a baseline for #4749

Signed-off-by: Adam Gutglick <adam@spiraldb.com>
@AdamGS AdamGS force-pushed the adamg/pre-allocate-var-bin-take-data branch 2 times, most recently from 0c8114a to 7cc7757 Compare September 24, 2025 18:49
@AdamGS AdamGS changed the title [experiment] Pre-allocate data buffer in VarBin::take Pre-allocate data buffer in VarBin::take Sep 24, 2025
@AdamGS AdamGS marked this pull request as ready for review September 24, 2025 18:49
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 24, 2025

CodSpeed Performance Report

Merging #4749 will improve performances by 26.69%

Comparing adamg/pre-allocate-var-bin-take-data (2e90821) with develop (7730f69)

Summary

⚡ 1 improvement
✅ 1155 untouched
⏩ 292 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
varbin_non_null 156 µs 123.1 µs +26.69%

Footnotes

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

@AdamGS
Copy link
Contributor Author

AdamGS commented Sep 24, 2025

the benchmark run right now compares against an old base because CI is a bit backed up, I'll re-run it once we get it back on track.

The perf improvement is clear now

Signed-off-by: Adam Gutglick <adam@spiraldb.com>
@AdamGS AdamGS force-pushed the adamg/pre-allocate-var-bin-take-data branch from 7cc7757 to 9797fd7 Compare September 24, 2025 19:31
new_offsets.push(O::zero());
let mut current_offset = O::zero();

// let mut builder = VarBinBuilder::<u32>::with_data_capacity(data_capacity, indices.len());
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this

Signed-off-by: Adam Gutglick <adam@spiraldb.com>
@AdamGS AdamGS merged commit a78e23c into develop Sep 25, 2025
40 checks passed
@AdamGS AdamGS deleted the adamg/pre-allocate-var-bin-take-data branch September 25, 2025 11:01
blaginin pushed a commit that referenced this pull request Sep 29, 2025
Sets a baseline for #4749

Signed-off-by: Adam Gutglick <adam@spiraldb.com>
blaginin pushed a commit that referenced this pull request Sep 29, 2025
Saves on many re-allocations of the data buffer in the builder.

---------

Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/performance A performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants