Skip to content

Remove crackL2BookFast, keep the general simdjson path as the sole l2Book parser - #159

Merged
TuxedoFish merged 1 commit into
mainfrom
perf/remove-l2book-fast-path
Sep 10, 2026
Merged

Remove crackL2BookFast, keep the general simdjson path as the sole l2Book parser#159
TuxedoFish merged 1 commit into
mainfrom
perf/remove-l2book-fast-path

Conversation

@TuxedoFish

@TuxedoFish TuxedoFish commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • crackL2BookFast (hand-rolled scanTo/memchr byte-scanner) showed no measurable speedup over crackL2Book (general simdjson path) in hyperliquid-md-benchmark's replay harness - percentiles overlapped across repeated runs.
  • This was kind of a preamture optimization I rolled in during the early days - it makes the codebase uglier and for no performance gain especially when the levels come every 5s...

Test plan

  • ctest (29/29 passing, including renamed L2BookCompact/L2BookWithWhitespace)
  • hyperliquid-md-benchmark replay: levelsSeen output identical before/after removal

🤖 Generated with Claude Code

https://claude.ai/code/session_018Le73N2EZjGLsCqmCScAse

Base automatically changed from perf/websocket-parser-validate-json-toggle to main September 10, 2026 10:56
…Book parser

crackL2BookFast (a hand-rolled scanTo/memchr byte-scanner) showed no measurable
speedup over crackL2Book in the hyperliquid-md-benchmark replay harness - fast
path vs general path percentiles overlapped across repeated runs, unlike the
clean, consistent effect measured for the validateJson toggle.

It also duplicated parsing logic that had to be kept in sync with crackL2Book,
and entirely bypassed simdjson's structural parsing (and the validateJson
safety net) whenever it succeeded, on the theory that the byte pattern looked
right - a separate correctness surface for no measured benefit. Removes it,
WebsocketParsingUtils::scanTo/parseUint64Fast (now unused), and the
fast-path-specific test comments/names.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Le73N2EZjGLsCqmCScAse
@TuxedoFish
TuxedoFish force-pushed the perf/remove-l2book-fast-path branch from bbc8281 to 1883f51 Compare September 10, 2026 14:13
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.09%. Comparing base (f67cd50) to head (1883f51).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
- Coverage   70.29%   70.09%   -0.21%     
==========================================
  Files          54       54              
  Lines        8900     8840      -60     
  Branches      539      530       -9     
==========================================
- Hits         6256     6196      -60     
  Misses       2639     2639              
  Partials        5        5              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added the ready for review CI passed; ready to be reviewed label Sep 10, 2026
@TuxedoFish
TuxedoFish merged commit b8a798c into main Sep 10, 2026
11 checks passed
@TuxedoFish
TuxedoFish deleted the perf/remove-l2book-fast-path branch September 10, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review CI passed; ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant