Skip to content

Replace the naive per-char impl with scan-to - #4

Merged
namingbe merged 5 commits into
masterfrom
claude/clever-euler-o0n9hi
Sep 6, 2026
Merged

Replace the naive per-char impl with scan-to#4
namingbe merged 5 commits into
masterfrom
claude/clever-euler-o0n9hi

Conversation

@namingbe

@namingbe namingbe commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Replace single-char reader.read() loop with bulk read into a
char[8192] buffer and scan for newline over the array. Eliminates
per-character method dispatch overhead (synchronized in BufferedReader)
while preserving resumability semantics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01761H3KorZV49nqsiWMqJAz
Standalone benchmark with the old per-char implementation inlined
for A/B comparison. Covers varying row counts, column counts, and
field lengths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01761H3KorZV49nqsiWMqJAz
Replace per-char charAt loop with indexOf('\n', start), a HotSpot
intrinsic that scans via SIMD. 1.4x-6.5x speedup on decode, scaling
with field length. Update benchmark to cover decode path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01761H3KorZV49nqsiWMqJAz
Retained in branch history for reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01761H3KorZV49nqsiWMqJAz
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01761H3KorZV49nqsiWMqJAz
@namingbe
namingbe merged commit 8ba8c02 into master Sep 6, 2026
8 checks passed
@namingbe
namingbe deleted the claude/clever-euler-o0n9hi branch September 6, 2026 12:37
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