Repository navigation
Releases
Release v0.11.1
What's Changed
- perf(compiler): stream sorted prefilter candidate ranges without slice growth by @cawalch in #618
- docs: refresh v0.11.0 refs, trim verbose notes, and compare libyara/YARA-X by @cawalch in #617
- perf(regex): reject non-empty fullword regex candidates before VM execution by @cawalch in #619
- perf(compiler): deduplicate identical hex atoms in sharedAutomaton with fanout by @cawalch in #620
- perf(hex): add 1-byte atom-adjacent discriminator for large hex fanout groups by @cawalch in #622
- docs: update cross-engine comparison table and Unreleased changelog for #618-#622 by @cawalch in #623
- docs: prepare v0.11.1 patch release notes by @cawalch in #624
Full Changelog: v0.11.0...v0.11.1
Release v0.11.0
What's Changed
- fix(compiler): preserve Teddy candidates across cancellation windows by @cawalch in #546
- perf(pe): share ordinal tables and preserve prefilter throughput by @cawalch in #547
- perf: reduce regex setup and compact prefilter root-miss work by @cawalch in #548
- perf(compiler): eliminate size-literal parsing allocations by @cawalch in #549
- perf: restore lexer snapshots and simplify AC root-miss scans by @cawalch in #550
- perf(compiler): reuse canonical PE schemas when loading programs by @cawalch in #551
- perf(semantic): share built-in function validation table by @cawalch in #552
- perf(semantic): reuse identifier suggestion rune buffers by @cawalch in #553
- perf(compiler): combine boolean condition analyses by @cawalch in #554
- perf(compiler): reuse rule condition analysis results by @cawalch in #555
- perf(semantic): use bounded string modifier tracking by @cawalch in #556
- perf(compiler): reuse condition opcode dispatch tables by @cawalch in #557
- perf(parser): avoid duplicate token synchronization by @cawalch in #558
- perf(lexer): fast-path unescaped string literals by @cawalch in #559
- perf(regex): reuse fixed-offset candidate buffers by @cawalch in #560
- perf(hex): eliminate branch copies and repeated failed-tail work by @cawalch in #561
- refactor: unify hex parsing and plain/XOR scan loops by @cawalch in #562
- perf: cache hex scan metadata in prepared programs by @cawalch in #563
- chore(security): pin benchstat and scope release workflow permissions by @cawalch in #564
- perf: reuse regex candidates and finish candidate collector cleanup by @cawalch in #565
- perf(pe): cache certificate fields within each scan by @cawalch in #566
- perf(pe): batch lazy import and export detail objects by @cawalch in #567
- perf(scanner): fast-path rejected Scan calls and remove dead prefilter fallback by @cawalch in #568
- perf(ac): release construction states and defer per-rule automatons by @cawalch in #569
- perf(compiler): reuse Teddy gates in compact prefilter and unify 16/32-bit AC search by @cawalch in #570
- perf(compiler): fast-path assertionProgram conditions and lean out Interpreter by @cawalch in #571
- perf(compiler): shrink globalMatchEntry to 16B, verify early, and avoid double populate by @cawalch in #572
- perf(scanner): use sharedAutomaton in ScanReader, BlockScanner, and StreamingProcessor by @cawalch in #573
- Update go-pe dependency to v0.1.0 by @cawalch in #574
- perf(regex): halve vmState.visited footprint, use bitmask char classes, and drop dead literal.go by @cawalch in #575
- refactor(compiler): remove MatchContext non-compact mode duplication by @cawalch in #576
- perf(compiler): use dense integer-indexed MatchContext spans by @cawalch in #577
- refactor(scanner): unify rule finalization pipeline across contiguous, stream, and block scanners by @cawalch in #578
- regex: unify consumeInstruction across VM and capture engine by @cawalch in #579
- compiler: pass *RegexPattern and eliminate closure in regex prefilter by @cawalch in #580
- compiler: slot-index local non-text match lookups by @cawalch in #581
- regex: merge escape validation and eliminate per-char atom allocations by @cawalch in #582
- pe: consolidate peSchema construction and defer legacy clones by @cawalch in #583
- compiler: replace 15 serialized*Entry types with generic serializedEntry[K, V] by @cawalch in #584
- semantic: collapse 4-way split expression type-switch dispatch by @cawalch in #585
- compiler: eliminate conditional defers in MatchingRules hot paths by @cawalch in #586
- regex: zero-allocation fast paths for leaf AST nodes in analyzeAtoms by @cawalch in #587
- compiler: write emitter stats directly into rule compilation stats by @cawalch in #588
- regex: lazily expand concat alternation covers and reuse single-byte literals by @cawalch in #589
- regex,compiler: eliminate intermediate fixedByteSets and literalAffixNodes allocations by @cawalch in #591
- test: stabilize integration and hex-jump performance checks by @cawalch in #590
- pefixture: deduplicate CMS/RFC3161 builders and cache test keys by @cawalch in #593
- pe: expose overlay.data_offset, overlay.data_size, and overlay.certificate_size by @cawalch in #595
- ci: split race test lanes and aggregate coverage by @cawalch in #594
- ci: shard fuzz targets and enforce the pinned oracle by @cawalch in #605
- perf(ahocorasick): sparse trie build, single-pass BFS closure, and byte-class tables by @cawalch in #604
- perf(scanner): reuse streaming buffers and skip unused accumulatedMatches map by @cawalch in #606
- perf(vm,compiler): lower standalone $id conditions, pre-resolve assertion slots, and skip empty slot-map loops by @cawalch in #607
- perf(compiler): cache compiled regex and hex patterns across rules in stringCompiler by @cawalch in #608
- perf(hex): scan large single-jump hex patterns directly without scratch reset or worklist reverse by @cawalch in #609
- perf(pe,regex): eliminate per-symbol view closures, lazily index import/export queries, and reuse regex.VMBatch by @cawalch in #610
- perf(teddy,ahocorasick): deduplicate prefixes before bank selection, eliminate tail-hit scalar rescans, and unroll sparse scalar roots by @cawalch in #611
- perf(serialization): remove redundant slice clones, seen map, and buffer regrowth by @cawalch in #612
- perf(semantic): reuse rule scopes, slab-allocate symbols, and share internal TypeInfo singletons by @cawalch in #613
- perf(regex,semantic,compiler): reuse regex.Parser, embed lexer, and reuse concat buffer by @cawalch in #614
- docs(changelog): prepare v0.11.0 release notes by @cawalch in #615
- docs: prepare v0.11.0 release site notes and README by @cawalch in #616
Full Changelog: v0.10.1...v0.11.0
Release v0.10.1
What's Changed
- fix(docs): reference built-in functions in module catalog probe by @cawalch in #534
- perf(compiler,ci): eliminate compact prefilter regressions and add CI perf gate by @cawalch in #536
- docs: prepare v0.10.1 changelog and release site notes by @cawalch in #537
Full Changelog: v0.10.0...v0.10.1
Release v0.10.0
Pure-Go pe module backed by go-pe, Go 1.27.0 toolchain bump, borrowed zero-copy evidence and streaming JSON output, byte-deterministic format 20 serialization, YARA Forge / strict libyara parity fixes, and prefilter/verification hotpath optimizations.
Upgrade notes
- Compiled caches: New programs use format 20 (adding
ModuleRegex/OpPushRegexin format 19 and byte-deterministic sorted map encodings in format 20); the reader accepts formats 4–20 (v0.9.0writes format 18 and cannot read formats 19–20). Recompile rules from source to gain deterministicMarshalBinary/WriteTooutput and compiled rule validation. Keep separate caches for rollback. - Go toolchain: Minimum supported Go toolchain is now Go 1.27.0 across
go.mod, CI, and docs. - Pure-Go PE module: Rules can now
import "pe"without CGO or external bindings (go-peis compiled in as a pure-Go dependency); non-PE rules incur zero PE parser or heap overhead.
Changed
- Updated the minimum supported Go toolchain version to Go 1.27.0 across module metadata, CI workflows, and documentation, adopted Go 1.27 standard library idioms across compiler/regex/semantic/CLI packages, removed dead regex literal helpers, and streamlined scanner prefilter/cancellation fast paths (#491).
Added
- Pure-Go PE module (
pe):- Headers, sections,
section_index(name)/section_index(file_offset),rva_to_offset(rva),overlay.offset/overlay.size,is_dll(),is_32bit(),is_64bit(), andis_dotnet()(#452, #461, #462, #485–#487, #502, #532). declared_extentandinput_truncatedfields so rules can detect truncated PE inputs explicitly (#501, #532).- Standard imports (
number_of_imports,number_of_imported_functions,import_details,importsqueries by name, ordinal, and compiled(dll_regex, function_regex), plusws2_32/wsock32/oleaut32ordinal display alias resolution),imphash(), standard exports (number_of_exports,export_details,export_timestamp,dll_name,exports/exports_indexqueries by name, ordinal, and regex), and bounded chunkedcalculate_checksum()(#453–#460, #483, #488, #490, #493, #494). - Resource metadata and locale queries (
number_of_resources,resources,resource_timestamp,resource_version), plusversion_info,version_info_list, andnumber_of_version_infos(#506, #507). - MSVC Rich header metadata and queries (
rich_signature.offset,length,key,raw_data,clear_data,version_data,version(...),toolid(...)) and CodeViewpdb_path(#508, #509). - Authenticode signature metadata and explicit offline integrity verification (
number_of_signatures,signatures,countersignatures,is_signed) without claiming CA trust (#497, #499). - Documented the native PE input-availability, file-offset vs. process-memory separation,
pe.number_of_imports > 0guard recommendation forpe.imphash(), and cooperative cancellation contract in native PE RFC and PE module docs, and added the pinned YARA Forge20261108PE capability report (docs/pe-capability-report.md) and fixture matrix suite (#489, #495, #504).
- Headers, sections,
- Added
ModuleRegex,CompiledRegex,RegexValue,CompileModuleRegex, andModuleContext.Done()alongside lexer function-argument regex literal support ((/,contexts),OpPushRegex, and format 19 serialization (#492). - Strict compatibility and condition quantifiers: Added
WithStrictLibyaraCompatibility(true)for libyara compile-time rejections (unreferenced strings, empty wildcard string sets) and general expression quantifiers inofandforconditions (#527, #528). - Borrowed evidence and zero-copy captures: Added
WithBorrowedEvidence(true)scanner option allowingCapture.Datato alias scanned input byte slices directly with 3-index capacity clipping, eliminating byte copying during evidence extraction (#361, #449). - Direct streaming JSON serialization: Added
AppendEvidenceJSONandWriteEvidenceJSON(plus(*EvidenceFinding).AppendJSONand(*Capture).AppendJSON) for reflection-free, deterministic streaming JSON encoding of evidence findings (#361, #449).
Fixed
- YARA Forge corpus compatibility: Fixed six lexer, parser, and semantic gaps (
strings:section state past 500-byte hex lookback, duplicatemeta:keys without condition variable binding, negative integers inmeta:, arithmetic expression parenthesized range upper bounds, postfix.stopping before.., and numeric/keyword string identifiers on!/@/#) (#496). - Compiler, interpreter, and regex correctness:
- Made
MarshalBinaryandWriteTobyte-deterministic (format 20) (#529). - Validated corrupt compiled artifacts (
ErrCorruptProgramviaValidate) and bounded bytecode interpreter execution (#520). - Rejected invalid hex jump bounds and bounded jump matching by reachable input (#521).
- Preserved strict parse error details, source positions, and rule context (#500).
- Enforced libyara int64 overflow and shift parity, percentage quantifier compile-time bounds (1–100), rejection of mixed greedy/ungreedy regex quantifiers, lifted budget cap on chained lazy dot ranges with budget telemetry, and left
entrypointundefined outside PE inputs (#523–#526, #530). - Empty module collections and integer ranges now evaluate to false for
any,all, andnone, undefined integer range bounds produce false instead of a scan error, and numeric0loop quantifiers usenonesemantics (#496).
- Made
Performance
- Scan, allocation, and serialization hotpaths: Eliminated whole-buffer
O(N)fallback hex jump scans on unreachable jumps, added pooledMatchContextsize-classes for pattern verification, and reducedMarshalBinaryallocations (#531). - Unused module setup: Cached the immutable built-in registry, semantic signatures, schemas, and function-ID bindings, and serialized only module functions referenced per rule. Text-only compilation drops from 88.47 KiB/507 allocations to 62.57 KiB/195 allocations on Go 1.26.9 and 1.27.3; representative text artifacts shrink from 6,206 to 5,316 bytes, and non-PE scans retain zero PE allocations (#482).
- Entropy-weighted atom selection & two-tier prefiltering: Introduced Shannon entropy, character class diversity, and corpus-wide IDF scoring in prefix atom selection plus two-tier prefilter rejection gating for non-text corpora (#450).
- Evidence pooling: Replaced per-finding field map allocations and occurrence tracking with scanner-managed pooled buffers in borrowed mode (#449).
Full changelog: v0.9.0...v0.10.0
Release v0.9.0
Regex and streaming correctness fixes, lower evidence and compilation allocations, and targeted regex/prefilter acceleration.
Upgrade notes
- Compiled caches: New programs use format 18; the reader accepts formats 4–18. v0.8.2 writes format 7 and cannot read format 18. Recompile rules from source to pick up corrected match-selection and verification metadata; accepting an older artifact does not regenerate its bytecode. Keep versioned caches during mixed-version deployments and rollback.
- Reader scans: Legacy unbounded regex artifacts without a finite verification horizon require recompilation or an explicit
WithMaxMatchSpanbefore reader scanning. Otherwise, the scan fails before reading input. Input buffering is bounded independently of stream length; accumulated occurrences, returned bytes, and evidence can still grow. - The Go requirement remains 1.26.0. Experimental SIMD paths require a separate Go 1.27+ /
GOEXPERIMENT=simdbuild; release CLI binaries use the default build. Built-in module coverage is unchanged: native PE/ELF modules are not added.
Fixed
- Regex occurrence selection: Preserve greedy/lazy endpoints and branch priority across literal alternatives, bounded and unbounded repetitions, optional entries, literal affixes, anchors, and atomless matching. Correct ASCII/wide selection, zero-length fullword occurrences, and fullword endpoint retries. These fixes affect counts, offsets, lengths, and conditions as well as boolean matches (#379–#432).
- Verification bounds: Preserve atom ordering and suffix bounds, handle oversized finite prefixes symbolically, and apply verification limits relative to selected atoms (#421, #423, #424, #426, #427).
- Streaming: Retain header bytes across chunks, propagate lookahead read errors, and finalize bounded/unbounded regex occurrences only when their decision horizon and boundary context are available or EOF is reached (#374, #375, #387, #428).
- Conditions and fixed offsets: Propagate undefined integer reads and match-query offsets, preserve scalar coercion in Boolean identity folds, support scalar operands of logical
not, and retain only eligible fixed-offset text/regex/hex matches (#373, #398, #400, #402–#404).
Performance
- Regex verification: Reuse failed verification work, accelerate eligible terminal bounded character classes, and share consuming transitions across groups of 4–64 compatible bounded acyclic regexes. Unsupported patterns retain the existing verifier; general cyclic combined-NFA execution is not added (#433, #439–#441).
- Large-corpus prefiltering: Diversify shared prefix atoms and select rarer fixed-offset mandatory atoms. Experimental SIMD adds ARM64/AVX2 rejection for inputs of at least 256 bytes when a complete cover fits at most 64 distinct prefix sets. Candidate inputs fall through to exact scanning and can pay for both passes (#435–#438).
- Evidence ownership: Reduce capture/correlation allocation using result-owned chunks and bounded reusable scratch. Returned evidence remains independent of input mutation, scanner reuse, and closure. The original match-heavy benchmark drops from 701 to 449 KB and 2,075 to 1,053 allocations per scan; borrowed evidence is not introduced (#434).
- Compilation: Bound identifier-suggestion edit-distance work while preserving diagnostics, reduce bounded-NFA preparation overhead, and avoid repeated dense automaton growth copies (#441–#443).
Measurements compare individual changes with their preceding commits, not v0.8.2 with the complete release. On the qualified diagnostic-heavy Signature-Base subset, #442 improves resilient loading 3.87× on native AMD64 and 5.20× on ARM64; #443 adds a further 4.8%/2.4% improvement and reduces allocated bytes by 9.4%. Synthetic shared-prefix regex cases improve substantially, but none of the three representative corpora in #441 activated the new combined-NFA or bounded-class plans. Smaller compile controls in #443 slowed by up to 3.7%; SIMD tail hits can cost more. See the linked PRs for eligibility, hardware, methodology, and tradeoffs.
Maintenance and validation
- Consolidate scanner execution, streaming accumulation, match-context finalization, regex byte-set analysis, and differential scan coverage; reuse range searches for exact occurrence queries (#364, #388–#396).
- Extend libyara differential regressions across scan modes, serialization, scanner reuse, and chunk boundaries. CI includes native AMD64/ARM64 SIMD jobs and 53 fuzz targets; the final implementation commit passed all applicable checks with 83.9% statement coverage.
Full changelog: v0.8.2...v0.9.0
Release v0.8.2
What's Changed
Full Changelog: v0.8.1...v0.8.2
Release v0.8.1
v0.8.1 completes the hooks and metrics instrumentation introduced in the scanner API.
Fixes
- Populate prefilter, pattern-search, and condition-evaluation timings, including speculative condition work without double-counting phases.
- Dispatch
OnPatternProfileand populate prefilter decision durations.CandidateHitsKnowndistinguishes available counts from fallback searches without a candidate stream. - Apply consistent scan and match accounting to detailed, boolean, rule-list, single-block, and accumulated-block scans. Successful completion callbacks now see final telemetry. Started failures contribute duration without successful matches; counters-only early stops leave timing fields untouched.
- Report per-rule loop-iteration deltas and prevent stale match-context data from appearing in rejected-rule profiles.
Timing remains opt-in. Profiles count retained occurrences and logical candidate hits; shared-cache attribution is not a count of physical verifier invocations. Hooks execute synchronously and add work when enabled.
Documentation and maintenance
The documentation site includes tested Go and CLI examples, algorithm explanations and diagrams, credential evidence extraction and validation, semantic diagnostics, and hooks/metrics guidance. Its on-demand browser playground runs locally with bounded input, output, memory, and execution time; selectable evidence examples redact captured values in the worker.
Updated pinned GitHub Actions in #355, #356, #357, and #358. TypeScript 5.9.3 is retained: #354 proposes TypeScript 7, which the current Astro checker does not support.
Compatibility
Go 1.26 or later is required. The serialized-program format remains 7, with formats 4–7 readable. CandidateHitsKnown is an added public struct field; use keyed literals if constructing PatternProfile values. Consumers of previously empty metrics or inactive callbacks should review the metric contracts.
Verification
The release commit passed CI, including race tests, lint, security, experimental SIMD, and fuzzing. The public Go proxy serves the expected tag commit, and its module passed the instrumentation regression tests plus telemetry, structured-module, serialization, and evidence examples.
The v0.8.1 documentation deployment passed 57 Chromium, Firefox, and WebKit checks and 62 external URL checks. Displayed Go and CLI examples passed against the tag and current source. The live version stamp, metrics example, search results, and redacted-evidence playground were checked after deployment.
All five archive checksums, layouts, architectures, and source revisions were verified. The checksum signature passed verification against the tag-specific workflow identity. All five binaries were also reproduced byte-for-byte from the tag with Go 1.26.10.
Downloaded macOS and Linux binaries, on both architectures, passed version, README, module, and assertion smoke tests. Windows packaging and build metadata were verified; its executable was not runtime-tested.
Build metadata: Linux amd64 reports a clean checkout. The other four binaries report vcs.modified=true because earlier build outputs remained in the release checkout. Their source revision is correct, and the byte-for-byte reproduction confirms the published contents. Root build/archive directories are now ignored on main to prevent this in future releases; the v0.8.1 tag is unchanged.
Release workflow · Release commit CI
Downloads
CLI archives cover Linux amd64/arm64, macOS amd64/arm64, and Windows amd64. Verify the archives against checksums.txt. The keyless signature in cosign.bundle can be checked with:
cosign verify-blob --bundle cosign.bundle \
--certificate-identity 'https://github.com/cawalch/go-yara/.github/workflows/release.yml@refs/tags/v0.8.1' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
checksums.txtRelease v0.8.0
Highlights
- Expanded built-in
hash,math,string, andtimemodules, float/mixedminandmax, and a bounded per-scan cache for repeated deterministic calls (#350). - Structured host modules with typed fields, arrays, dictionaries, constants, and collection loops (#351).
- Fused assertions, stack-free boolean conditions, and shared payload/external guards (#353).
- Standard YARA-style CLI scanning, recursive traversal, filtering, match reporting, and JSON output.
- Memory-mapped file scanning, match-free scan modes, regex/hex prefilter improvements, and concurrent regex cache fixes.
Compatibility
New serialized programs use format 7. Formats 4–6 remain readable; older binaries cannot load format-7 artifacts. Rebind external variables, custom callbacks, and host module data after loading.
Integer math.min/max retain YARA's unsigned comparison semantics. Float/mixed overloads and hash.sha512 are go-yara extensions. Binary-prefix parsing and high-byte string statistics have documented, deterministic behavior where native libyara varies by platform.
Full-condition bounded-memory streaming remains deferred to #352. --streaming reports literal text matches only; ScanReader buffers the entire input.
Performance and validation
Three paired Apple M3 Max runs on synthetic guard-heavy rules reduced median condition dispatch by 60.1% and passing 200-rule scans by 28.0% versus unfused compilation. These measurements are workload-specific.
The release code passed CI, race and bugproof tests, security checks, all 47 fuzz targets, and native module/condition oracle checks on macOS, Linux amd64, and Linux arm64. The release preparation commit changes documentation only.
Downloads
CLI archives are provided for Linux amd64/arm64, macOS amd64/arm64, and Windows amd64. All five archive checksums, layouts, architectures, and source revisions were verified. The checksum signature was verified against the tag-specific GitHub Actions release identity.
Downloaded macOS and Linux binaries (both architectures) passed version, README example, module, and assertion smoke tests. Windows packaging and build metadata were verified; the Windows executable was not runtime-tested. The public Go proxy module passed the structured-module README example and format-7 serialization round trip.
Verify archives against checksums.txt; cosign.bundle contains the keyless signature for that checksum file. With Cosign installed:
cosign verify-blob --bundle cosign.bundle \
--certificate-identity 'https://github.com/cawalch/go-yara/.github/workflows/release.yml@refs/tags/v0.8.0' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
checksums.txtRelease v0.7.2
Sweeping Codebase Reduction (-6,866 Lines)
This release completes six consecutive passes of extensive codebase streamlining across 66 files (-6,866 net lines), eliminating dead code, obsolete prototypes, redundant helpers, and unneeded infrastructure while preserving 100% test coverage and full feature fidelity:
- Pass 1 (#339): Removed orphaned TypeChecker, unused AST visitor boilerplate, and dead compiler heuristic routines.
- Pass 2 (#340): Pruned dead emitter wrappers, condition compiler helpers, and regex bytecode routines.
- Pass 3 (#341): Pruned dead bytecode helpers, semantic symbol/type lookup methods, and legacy parser strict wrapper.
- Pass 4 (#342): Removed legacy atom generator (
compiler/atoms.go) and obsoleteBatchCompile/ValidateCompilationhelpers. - Pass 5 & 6 (#343): Pruned interpreter debug tracing mode, execution plan prototype structures, compilation report generator, and dead string compiler helpers.
- Workflow & CLI Hardening (#344): Hardened release workflow artifact upload against pre-existing release collisions and added
-v/--versionsupport to the CLI binary.
Pull Requests Included
- refactor: code reduction pass 2 (prune orphaned TypeChecker, unused AST visitor, and dead heuristics) by @cawalch in #339
- refactor: prune dead compiler emitter wrappers, condition compiler helpers, and regex bytecode methods by @cawalch in #340
- refactor: prune dead bytecode helpers, semantic symbol/type methods, and parser strict wrapper by @cawalch in #341
- refactor: prune legacy atoms implementation, redundant condition compiler and compiler helpers by @cawalch in #342
- refactor: prune interpreter debug mode, execution plan, compilation report, and dead string helpers by @cawalch in #343
- ci: harden release workflow artifact upload and add CLI version flag by @cawalch in #344
Full Changelog: v0.7.1...v0.7.2
Release v0.7.1
Performance
-
Two-Pointer Proximity Loop Linearization (
OpProximity): Added dedicatedOpProximityopcode and zero-allocation two-pointer evaluation inMatchContext.hasProximity, accelerating string ordering and distance loops (@b[j] > @a[i] and @b[j] - @a[i] < K) from$O(N \cdot M)$ nested interpreter loops to$O(N + M)$ time (#334). -
$O(\log N)$ Binary Search Offset Lookups: Replaced linear string match offset scans with binary search over sorted match offsets and short-circuited set evaluation, eliminating pathological latency on large match sets (#335). - End-to-End Scanning Throughput: Reduced proximity-heavy condition evaluations across 24,000+ files from >900s timeouts down to ~1.0s (>1,000x speedup), enabling registry-scale corpus sweeps across 59,000+ files (2.7 GB) in 3.6s.
Bug Fixes
- Bounded
for-Loop Body Parsing: Bounded parenthesizedfor-loop bodies to terminate at the matching closing parenthesis rather than greedily consuming trailingor/andbinary operators in chained condition expressions (#336).
Documentation & Benchmarks
- Standalone Benchmarks: Refreshed README and documentation with standalone scanning throughput and latency benchmarks, removing external implementation comparisons and non-standard markup (#337).
Real-World Performance Impact
| Workload | Corpus | Before | After (v0.7.1) |
|---|---|---|---|
JS_Loader_FieldToCode |
24,041 files (381 MB) | Timed out (>1200 s) | 1.0 s |
| Full loader family rules | 24,041 files (381 MB) | Timed out (>900 s) | 1.06 s (3 matches) |
| Full loader family rules (non-vendored) | 3,134 files | — | 0.29 s (1 match) |
| Real-world npm package trees | 59,047 files (2.7 GB) | Infeasible / timeout | 3.6 s (3 matches) |