Skip to content

Conversation

Dr-Emann
Copy link
Member

@Dr-Emann Dr-Emann commented Sep 8, 2025

Actually, in ra_portable_serialize.

There's no need to allocate an array for the run container bitset, then copying into the destination buffer. Instead, write directly into the destination buffer.

Actually, in roaring_bitmap_portable_serialize.

There's no need to allocate an array for the run container bitset, then
copying into the destination buffer. Instead, write directly into the
destination buffer.
@Dr-Emann Dr-Emann requested a review from Copilot September 8, 2025 04:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Optimizes memory allocation in the ra_portable_serialize function by eliminating an unnecessary intermediate array allocation for the run container bitset, instead writing directly to the destination buffer.

  • Replaces heap allocation with direct buffer manipulation
  • Eliminates memory copy operation between intermediate array and destination buffer
  • Removes associated memory deallocation call

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lemire
Copy link
Member

lemire commented Sep 8, 2025

Wow.

@lemire lemire merged commit 07f8302 into RoaringBitmap:master Sep 8, 2025
18 checks passed
@lemire
Copy link
Member

lemire commented Sep 8, 2025

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants