Repository navigation
Conversation
Contributor
Author
|
The only test failure is an |
Collaborator
|
@Altren is this ready for review/merge? |
Contributor
Author
|
Yes |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change uses the reported file size as an allocation hint and reads directly into the buffer. When the size is unavailable or more data follows, it continues in 64 KiB blocks without seeking. Binary and text modes remain distinct, including native text conversion; the hint is not treated as a guaranteed byte count.
The shared save helpers now check stream state after closing, returning an error for failed writes or buffered-output flushes instead of reporting success. Reader stream errors and directories also return errors. Public APIs remain unchanged.
Measurements
Measurements compare upstream main (
bb0c1dcb) with the new shared file loaders. Both sides use the same parser and serializer code. Apple Clang 21, macOS arm64, C++20 Release-O3 -DNDEBUG, no LTO. Six process runs with rotated/reversed case order; at least 0.1 s warmup and 0.25 s measured CPU time per case. Tables report median wall-clock milliseconds, including file open/read/close, allocations, and result destruction. Files are in the OS cache; these are not cold-disk throughput measurements. Fixture generation and equality checks are outside timing.File loading only
Complete file load and deserialization
Dataset contains 500 groups, each with 3,000 points (
double x, y) and 3,000 uint64 IDs. Both loaders reproduce every original field.Validation
BM_load_filecases to the all-format benchmark target for binary/text files at 1 KiB, 1 MiB, and 32 MiB; all six compiled and ran./dev/fulltest checks buffered output failure at close. Linux and Windows were not run locally; the text-mode equivalence test is portable and intended to exercise Windows newline conversion in CI.