Skip to content

Conversation

@rasa
Copy link
Contributor

@rasa rasa commented Nov 9, 2023

Notes:

  1. Works fine with Bash 3.2 using shenv.
  2. Bash is passed the —posix flag to ensure the generated script is POSIX compatible.
  3. The script is compatible with git 2.1, by checking if a post-2.1 flag is supported, before passing it to git.
  4. The awk command is passed the —-posix flag, too.

Here are some timings running on Ubuntu 23.10:

tj/git-extra repo:
This PR: ~83% faster:
real    0m2.863s
user    0m1.799s
sys     0m1.596s

Current code:
real    0m6.151s
user    0m10.673s
sys     0m7.714s

git/git repo:
This PR: ~99% faster:
real    0m28.329s
user    0m41.931s
sys     0m13.390s

Current code:
real    21m23.475s
user    73m27.860s
sys     8m2.065s

torvalds/linux repo:
This PR: ~98% faster
real    11m35.754s
user    11m45.818s
sys     4m14.276s

Current code:
real    507m44.527s
user    1025m12.210s
sys     225m39.957s

@spacewander spacewander merged commit 4d8060e into tj:main Nov 11, 2023
@rasa rasa deleted the rasa/speedup-utimes branch January 21, 2024 16:11
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