Skip to content

Improve the handling of regular expressions#201

Merged
sylvestre merged 2 commits intouutils:mainfrom
dspinellis:improve-re-handling
Dec 16, 2025
Merged

Improve the handling of regular expressions#201
sylvestre merged 2 commits intouutils:mainfrom
dspinellis:improve-re-handling

Conversation

@dspinellis
Copy link
Copy Markdown
Collaborator

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.14%. Comparing base (8c519f1) to head (11f235d).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #201      +/-   ##
==========================================
- Coverage   82.31%   82.14%   -0.17%     
==========================================
  Files          13       13              
  Lines        5371     5322      -49     
  Branches      293      293              
==========================================
- Hits         4421     4372      -49     
  Misses        948      948              
  Partials        2        2              
Flag Coverage Δ
macos_latest 82.58% <100.00%> (-0.17%) ⬇️
ubuntu_latest 82.70% <100.00%> (-0.16%) ⬇️
windows_latest 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@sylvestre sylvestre force-pushed the improve-re-handling branch 2 times, most recently from f549f6f to b14975b Compare December 16, 2025 19:50
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Dec 16, 2025

CodSpeed Performance Report

Merging #201 will degrade performances by 10.99%

Comparing dspinellis:improve-re-handling (11f235d) with main (8c519f1)

Summary

❌ 1 regression
✅ 10 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
number_fix 506 ms 568.5 ms -10.99%

It's difficult to make quoting work reliably and portably with the
Windows shell, so in most casesEsupply sed commands as files.
Keep using regex_fancy for regexes containing backreferences.
This removes a complex unneeded matcher selection RE and also
provides an overall small performance boost.

     access-log-no-del pre-use-bytes is  1.02 times faster than use-re-bytes
    access-log-all-del use-re-bytes is  1.02 times faster than pre-use-bytes
   access-log-translit pre-use-bytes     is similarly fast as   use-re-bytes
access-log-complex-sub pre-use-bytes     is similarly fast as   use-re-bytes
     access-log-append pre-use-bytes     is similarly fast as   use-re-bytes
             remove-cr use-re-bytes is  1.08 times faster than pre-use-bytes
          genome-subst use-re-bytes is  1.05 times faster than pre-use-bytes
            number-fix pre-use-bytes is  1.02 times faster than use-re-bytes
           long-script use-re-bytes is  1.01 times faster than pre-use-bytes
                 hanoi pre-use-bytes     is similarly fast as   use-re-bytes
             factorial use-re-bytes is  1.03 times faster than pre-use-bytes

Suggested by: Andrew Gallant @BurntSushi
@sylvestre sylvestre merged commit 1454198 into uutils:main Dec 16, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants