Skip to content

platformstl::file_lines performance tests - #21

Open
synesissoftware wants to merge 13 commits into
file_lines.testsfrom
file_lines.perf
Open

synesissoftware wants to merge 13 commits into
file_lines.testsfrom
file_lines.perf

Conversation

@synesissoftware

Copy link
Copy Markdown
Owner

Add a standalone comparative performance test for platformstl::file_lines_a and std::ifstream plus std::getline; follow existing STLSoft warm-up, stopwatch, anchoring, and tabular output conventions;

Add a standalone comparative performance test for platformstl::file_lines_a
and std::ifstream plus std::getline; follow existing STLSoft warm-up,
stopwatch, anchoring, and tabular output conventions;
Add a byte-oriented write that preserves embedded NULs, and deprecate
write(void const*, size_t) in its favour. Cover CR and CRLF files in the
file_lines component tests, and write the NUL fixture through
write_binary().
Time LF, CRLF, and CR at the existing 1000×64 and 5000×80 shapes, and at
1×16, 8×32, and 32×64, so a later small-file path has a fixed-cost region
to beat. Read the getline baseline in binary mode so the CR bytes are the
same on every platform.
Remove the full-file m_contents heap copy; parse directly from the mmap'd
base pointer for lower memory bandwidth use. Drop the unused m_contents
member and early-return on empty maps.
Avoid MinGW std::ifstream/std::getline crashes by switching the perf
fixture writer/reader to fopen/fwrite/fgetc while preserving split on '\n'
semantics (keeping '\r' in-line).
- Rename the existing per-character stdio baseline to vector<std::string>
  plus getc;
- add a genuine std::getline baseline using the appropriate LF or CR
  delimiter and normalise CRLF line endings;
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