Icod.Grep 1.6.0: performance and scalability - #12
Open
uniblab wants to merge 55 commits into
Open
Conversation
…od.Grep into performance-scalability-1.6.0
uniblab
marked this pull request as ready for review
September 3, 2026 02:08
uniblab
marked this pull request as draft
September 3, 2026 02:08
uniblab
marked this pull request as ready for review
September 3, 2026 08:30
uniblab
force-pushed
the
performance-scalability-1.6.0
branch
from
September 5, 2026 04:34
aa10b01 to
d4da9d8
Compare
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.
Implements T6 — Performance and Scalability for the
Icod.Grep 1.6.0release from mergedmain/1.5.0at423c0e9623100492fa01b6e4d14c183761d111d7.Governing principle
All quantitative acceptance decisions are based on repeated BenchmarkDotNet comparisons on the established physical Windows reference host. GitHub-hosted Windows/Linux/macOS runs remain correctness and benchmark-smoke gates rather than sources for narrow percentage claims.
Completed T6 work
T6.0 — benchmark foundation and immutable 1.5.0 baseline
Established deterministic command, filesystem, and record-reader benchmarks; physical-host metadata; ABBA comparison tooling; hosted benchmark smokes; and the retained
1.5.0reference report.T6.2 / CommandFramework R2.5 consumer integration
Integrated
Icod.CommandFramework 2.2.0prepared byte input so managed BRE/ERE matching prepares each searched record once and reuses that representation across repeated offsets, multiple patterns, and-oenumeration.Representative physical improvements versus
1.5.0included:T6.1 — fixed-string scalability — closed
Added an immutable Aho-Corasick-style matcher for the conservative case-sensitive multi-pattern
-Fsubset while preserving fallback behavior for-i,-w,-x, and empty patterns.Physical results included:
fixed-100: roughly 63× faster than1.5.0;fixed-1000: roughly 341× faster in the focused physical run;Closure report:
Icod.Grep-1.6.0-T6.1-Closure-and-Residual-Report.md.T6.4 — binary probing — closed
Seekable binary probing now reads bounded 8 KiB chunks up to the GNU-compatible probe window, stops immediately on NUL/EOF, uses pooled storage, and restores the original stream position exactly. Non-seekable prefix replay remains unchanged.
Representative physical results:
Closure report:
Icod.Grep-1.6.0-T6.4-Binary-Probe-Closure-Report.md.T6.3 — record pipeline and very-large-record scalability — closed
Candidate 1 removed Grep's redundant copy of each already-owned
ByteRecord. Candidate 2 then bypassed the shared materializing compatibility reader inside Grep and consumes independently owned record segments directly, only reassembling records that actually span segments.Representative Candidate 2 improvements over Candidate 1:
Shared CommandFramework record-reader controls remained unchanged.
Closure report:
Icod.Grep-1.6.0-T6.3-Closure-and-Residual-Report.md.T6.6 — filesystem / many-file scalability — closed
Eliminated redundant
System.IO.FileStreamread buffering beneath Grep's own bounded segmented-reader buffer. Traversal ordering and concurrency semantics remain unchanged.Physical results:
Closure report:
Icod.Grep-1.6.0-T6.6-Filesystem-Closure-Report.md.Current tranche — T6.5 output, formatting, color, and context allocation
The existing benchmark suite was intentionally output-light, so T6.5 first adds deterministic output-heavy measurements before changing production output code.
Current benchmark head
c0fcffb5d529691891c727fbf9816f2e8d14ec74adds:-H -n -bprefix-heavy output;-ooutput;Each workload validates its expected output before BenchmarkDotNet measures it. PR CI is green across Windows, Linux, macOS, benchmark smokes, package smokes, and archive smokes.
The next gate is the physical pre-optimization T6.5 reference measurement on these new workloads. No output-path optimization will be accepted before that baseline identifies the dominant allocation costs.
Remaining T6 work
Version
The development and package version remain
1.6.0.