Visitar URL original
Parse common English dates without the general parser by kprobe0 · Pull Request #16058 · uutils/coreutils · GitHub
Skip to content

Parse common English dates without the general parser - #16058

Closed
kprobe0 wants to merge 1 commit into
uutils:mainfrom
kprobe0:date-fast-english-datetime
Closed

kprobe0 wants to merge 1 commit into
uutils:mainfrom
kprobe0:date-fast-english-datetime

Conversation

@kprobe0

@kprobe0 kprobe0 commented Oct 30, 2026 •

Copy link
Copy Markdown

Summary

  • date -f on ordinary lines such as Sat Sep 20 22:11:30 2014 was about 2.4× slower than GNU date. Fixes perf(date): Slower than GNU #14750 for that input.
  • Those lines are now parsed directly. A release timing of 2000 of them was 0.33 ms versus 3.38 ms through parse_datetime.
  • Any other shape still goes through the general parser. A unit test checks the direct parse against that parser, including a one-digit day and a trailing space.

Test plan

date -f on lines like "Sat Sep 20 22:11:30 2014" was spending its time in the general date parser. Recognize that form directly. Other inputs still use the general parser, and the result matches it.
@kprobe0
kprobe0 force-pushed the date-fast-english-datetime branch from 4dca890 to 3b4d49d Compare October 30, 2026 18:40
@xtqqczze

Copy link
Copy Markdown
Collaborator

@kprobe0 please confirm it is ready for review or convert to draft

@sylvestre

Copy link
Copy Markdown
Contributor

any idea why codspeed doesn't detect it ? :)

@kprobe0 kprobe0 closed this Oct 31, 2026
@kprobe0
kprobe0 deleted the date-fast-english-datetime branch October 31, 2026 10:13
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.

perf(date): Slower than GNU

3 participants