Skip to content

Conversation

@connortsui20
Copy link
Contributor

@connortsui20 connortsui20 commented Oct 24, 2025

Tracking Issue: #5028

Adds methods to PVec that are similar in nature to the methods available on the standard library Vec implementation.

Note that none of these are strictly necessary right now, but I wanted to have this now so we can write more meaningful tests (instead of ones that just track metadata like length and capacity).

I want to add these methods in the future, but they should probably come in a separate PR:

  • into_iter
  • retain (that takes a Fn(Option<&T>) -> bool instead of Fn(&T) -> bool
  • retain_mut (similar to above but &mut T
  • retain_indices (we can use this to implement filter for primitive arrays)
  • extend_from_slice (a nice to have because we know the exact length of the slice and don't have to do all the weird iterator size hint stuff)
  • copy_within
  • fill_range
  • drain (maybe we don't need this but I can see it being useful)
  • splice (same)
  • remove
  • swap_remove

There are others, but probably a lot less important

@connortsui20 connortsui20 added the feature Release label indicating a new feature or request label Oct 24, 2025
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 95.98765% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.57%. Comparing base (10a2c86) to head (5ebaa5e).
⚠️ Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
vortex-mask/src/mask_mut.rs 75.86% 7 Missing ⚠️
vortex-vector/src/primitive/generic.rs 87.50% 4 Missing ⚠️
vortex-vector/src/primitive/pvector_impl.rs 99.23% 2 Missing ⚠️

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

@connortsui20 connortsui20 force-pushed the ct/vv-methods branch 2 times, most recently from 70b726f to 854e811 Compare October 27, 2025 15:46
@connortsui20 connortsui20 changed the title Feature: Add methods to PVec similar to std::vec::Vec Feature: Add methods to PVectorMut similar to std::vec::Vec Oct 27, 2025
@connortsui20 connortsui20 changed the base branch from ct/rename-pvector to develop October 27, 2025 15:46
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 27, 2025

CodSpeed Performance Report

Merging #5079 will degrade performances by 37.81%

Comparing ct/vv-methods (fcafdd5) with develop (10a2c86)1

Summary

⚡ 5 improvements
❌ 5 regressions
✅ 1308 untouched
🆕 7 new
⏩ 22 skipped2

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
patched_take_200k_dispersed 5.7 ms 4.7 ms +19.69%
patched_take_200k_first_chunk_only 5.4 ms 4.8 ms +11.82%
take_200k_dispersed 4.6 ms 3.7 ms +23.63%
take_200k_first_chunk_only 4.3 ms 3.4 ms +25.55%
new_alp_prim_test_between[f64, 32768] 174.1 µs 232.7 µs -25.18%
new_bp_prim_test_between[i64, 32768] 217.2 µs 158.2 µs +37.33%
from_iter[BitBuffer, 1024] 7.1 µs 8.7 µs -18.09%
from_iter[BitBuffer, 16384] 41.3 µs 64.2 µs -35.67%
from_iter[BitBuffer, 2048] 9.3 µs 12.3 µs -24.31%
from_iter[BitBuffer, 65536] 150 µs 241.1 µs -37.81%
🆕 decompress[("alp_for_bp_f64", 0x7588b0)] N/A 24.2 ms N/A
🆕 decompress[("datetime_for_bp", 0x75bb90)] N/A 34.9 ms N/A
🆕 decompress[("dict_fsst_varbin_bp_string", 0x75aca0)] N/A 14.5 ms N/A
🆕 decompress[("dict_fsst_varbin_string", 0x75a610)] N/A 14.5 ms N/A
🆕 decompress[("dict_varbinview_string", 0x7592d0)] N/A 14.7 ms N/A
🆕 decompress[("for_bp_u64", 0x758160)] N/A 2.5 ms N/A
🆕 decompress[("runend_for_bp_u32", 0x759760)] N/A 2 ms N/A

Footnotes

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

  2. 22 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.

@connortsui20 connortsui20 changed the base branch from develop to ct/vv-from-iter-fix October 27, 2025 16:41
Base automatically changed from ct/vv-from-iter-fix to develop October 27, 2025 16:49
@connortsui20 connortsui20 marked this pull request as draft October 27, 2025 18:43
@cloudflare-workers-and-pages
Copy link

Deploying vortex-bench with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5ebaa5e
Status: ✅  Deploy successful!
Preview URL: https://9006aa31.vortex-93b.pages.dev
Branch Preview URL: https://ct-vv-methods.vortex-93b.pages.dev

View logs

@connortsui20 connortsui20 marked this pull request as ready for review October 27, 2025 18:44
@connortsui20 connortsui20 force-pushed the ct/vv-methods branch 2 times, most recently from e9ef943 to f3fa13d Compare October 27, 2025 19:23
@connortsui20 connortsui20 requested a review from gatesn October 27, 2025 19:23
@gatesn gatesn enabled auto-merge (squash) October 27, 2025 19:37
@gatesn gatesn merged commit 560aa17 into develop Oct 27, 2025
39 of 40 checks passed
@gatesn gatesn deleted the ct/vv-methods branch October 27, 2025 19:40
@connortsui20 connortsui20 mentioned this pull request Oct 27, 2025
39 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Release label indicating a new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants