Skip to content

Checkpoint pdarrays of bigints - #4771

Merged
ajpotts merged 2 commits into
Bears-R-Us:mainfrom
vasslitvinov:checkpoint-bigints
Aug 8, 2025
Merged

ajpotts merged 2 commits into
Bears-R-Us:mainfrom
vasslitvinov:checkpoint-bigints

Conversation

@vasslitvinov

@vasslitvinov vasslitvinov commented Aug 7, 2025 •

Copy link
Copy Markdown
Contributor

Add support for bigint arrays to checkpointing.

The initial implementation used ULEB128 encoding for saving "count", i.e., the number of bytes needed to store a given bigint. The intention was to use the smallest number of bytes possible for representing the "count", as ULEB128 is variable-length, akin to utf-8. I changed to always using 4 bytes for saving "count" in the second commit to simplify the code. I consider the use of extra 2 bytes for bigints that fit within (2^15-1) bytes (4 bytes vs. ULEB128) to be a reasonable compromise between maintainability and efficiency.

Contributes to #2384.

@lydia-duncan lydia-duncan 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.

Only one naming nit, otherwise I think this looks good!

Comment thread src/CheckpointMsg.chpl Resolved

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

Looks good

@ajpotts
ajpotts added this pull request to the merge queue Aug 8, 2025
Merged via the queue into Bears-R-Us:main with commit 0295c49 Aug 8, 2025
@vasslitvinov
vasslitvinov deleted the checkpoint-bigints branch August 8, 2025 23:41
drculhane pushed a commit to drculhane/arkouda that referenced this pull request Aug 20, 2025
Add support for bigint arrays to checkpointing.

The initial implementation used ULEB128 encoding for saving "count",
i.e., the number of bytes needed to store a given bigint. The intention
was to use the smallest number of bytes possible for representing the
"count", as ULEB128 is variable-length, akin to utf-8. I changed to
always using 4 bytes for saving "count" in the second commit to simplify
the code. I consider the use of extra 2 bytes for bigints that fit
within (2^15-1) bytes (4 bytes vs. ULEB128) to be a reasonable
compromise between maintainability and efficiency.

Contributes to Bears-R-Us#2384.

---------

Signed-off-by: Vassily Litvinov <[email protected]>
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.

4 participants