mirror of
https://github.com/obra/superpowers.git
synced 2026-04-16 10:29:57 +00:00
The character-by-character loop using ${input:$i:1} was O(n^2) in
bash due to substring copy overhead. On Windows Git Bash this took
60+ seconds, freezing terminal input even with async hooks.
Replaced with bash parameter substitution (${s//old/new}) which runs
each pattern as a single C-level pass. 7x faster on macOS, expected
to be dramatically faster on Windows Git Bash where the original
caused the worst hangs.
Relates to #404, #413
1.9 KiB
Executable File
1.9 KiB
Executable File