Skip to content

perf: add slots to virtual array to reduce instance alloc size#3613

Merged
ianna merged 1 commit intoscikit-hep:mainfrom
pfackeldey:virtual_array_slots
Aug 26, 2025
Merged

perf: add slots to virtual array to reduce instance alloc size#3613
ianna merged 1 commit intoscikit-hep:mainfrom
pfackeldey:virtual_array_slots

Conversation

@pfackeldey
Copy link
Copy Markdown
Collaborator

This PR adds __slots__ to VirtualArray which reduces a few bytes of the instance allocation. This piles up for large complex structures such as coffea.NanoEvents and can reduce memory footprint for many delayed operations on the full layout noticeably.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.48%. Comparing base (b749e49) to head (601937f).
⚠️ Report is 399 commits behind head on main.

Additional details and impacted files
Files with missing lines Coverage Δ
src/awkward/_nplikes/virtual.py 90.65% <100.00%> (ø)

... and 195 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ianna ianna added the pr-next-release Required for the next release label Aug 14, 2025
@pfackeldey pfackeldey requested a review from ianna August 14, 2025 19:48
Copy link
Copy Markdown
Member

@ianna ianna left a comment

Choose a reason for hiding this comment

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

@pfackeldey - Great! Thanks!

@ianna ianna merged commit d89f7ae into scikit-hep:main Aug 26, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-next-release Required for the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants