Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: c1da680b258303fa33d4dd204800ebee8b34b577
      
https://github.com/Perl/perl5/commit/c1da680b258303fa33d4dd204800ebee8b34b577
  Author: Richard Leach <[email protected]>
  Date:   2026-10-04 (Sun, 04 Oct 2026)

  Changed paths:
    M pod/perlreguts.pod
    M regcomp.c
    M regcomp.sym
    M regcomp_debug.c
    M regcomp_study.c
    M regexec.c
    M regnodes.h
    M t/re/anyof.t

  Log Message:
  -----------
  Add NEXACTb regnode for single negated character (/[^x]/)

These can be relevant to use cases such as:
* Scanning for the end of a long, single character prefix
* Matching characters that are not some kind of closing delimeter

Specializing on a single character hopefully allows for better
throughput than the general multi-char `ANYOFM` can manage.

Matching against a string of 2000000 non-"A" bytes:

               /\A[^A]+/    /^A[^A]+/
    Blead        4773/s       4762/s
    Patched     56216/s      54094/s

To find possible starting candidate positions,`NEXACTb` will use
`S_find_span_end` instead of `S_find_span_end_mask` (used by `NANYOFM`).
In the worst case, performance of the two should be very similar, but
in the best case, `S_find_span_end` could be noticeably faster.
(See https://github.com/Perl/perl5/pull/24894)



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to