Skip to content

docs: make benchmark commands non-destructive and preserve captures - #355

Open
Likio3000 wants to merge 1 commit into
chmln:masterfrom
Likio3000:docs/non-destructive-benchmarks-20260923
Open

Likio3000 wants to merge 1 commit into
chmln:masterfrom
Likio3000:docs/non-destructive-benchmarks-20260923

Conversation

@Likio3000

Copy link
Copy Markdown

The file-based benchmark commands currently edit their inputs in place, so repeated runs no longer measure the same input. The regex example also lets the child shell expand $1 before sd sees it.

Use -p for both sd commands and escape the capture references for hyperfine's child shell. Note the GNU sed/POSIX shell assumption, and remove the two old timing tables and speedup claims rather than imply they were measured with these corrected commands. The separate line-by-line/across results are unchanged.

Related to #52. Validated command quoting with local shell stubs and checked preview behavior against the current source. No sd, hyperfine, project tests, or benchmarks were run. Prepared and reviewed with AI assistance.

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.

1 participant