Skip to content

v3.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Sep 08:43

Performance

  • Replace the separate SIMD search loops with a bounded two-byte candidate filter for case-sensitive literals of 2–64 bytes, using NEON, SSE2, AVX2 or AVX-512. Full comparisons run only on surviving candidates; counting skips directly to the next line.
  • Compute line numbers and JSON columns with forward-only cursors instead of repeatedly scanning from the beginning of the file. Numbered, contextual and JSON output now scan the text in linear time.
  • Stop -q, -l and -L searches at the first match, avoid worker creation and eager mapping population for these checks, and stop quiet recursive traversal once a match is found.
  • Add an offline release benchmark that verifies identical output and exit status before comparing interleaved runs with a previous executable. See the measured results and reproduction instructions.

Fixed

  • Preserve whole-word boundaries and line counts across SIMD tails without reading beyond text or pattern buffers.
  • Keep whole-word and non-overlapping -o matches consistent across file chunks. SIMD -o now emits non-overlapping matches, including self-overlapping patterns.
  • Return the correct match status for quiet searches on stdin and strings, and honor -m 0 in existence checks.
  • Preserve empty lines when selecting before-context and sort multi-pattern stdin/string matches before formatting output.

Build and validation

  • Add make PORTABLE=1 for distributable x86-64 binaries using baseline SSE2, without requiring the build host's AVX extensions. Release archives include the license, README and changelog.
  • Add deterministic oracle tests with protected memory pages and CLI regression tests covering output, SIMD/scalar agreement, recursion and thread boundaries.
  • Add make sanitize and Linux/macOS CI coverage for AddressSanitizer and UndefinedBehaviorSanitizer, plus portable x86-64 and AVX2 builds.
  • Make CI and release smoke benchmarks independent of external dataset downloads. Fix make clean and directory-test header dependencies.