Skip to content

Add --env for environment variable overrides - #996

Merged
sharkdp merged 1 commit into
masterfrom
codex/environment-overrides
Oct 7, 2026
Merged

sharkdp merged 1 commit into
masterfrom
codex/environment-overrides

Conversation

@sharkdp

@sharkdp sharkdp commented Oct 7, 2026

Copy link
Copy Markdown
Owner

This allows setting environment variables without an intermediate shell, and without using something like env OMP_NUM_THREADS=.. my_command, which adds ~5ms overhead.

This can be used with parameter expansion, for example:

hyperfine -P threads 1 8 --env 'OMP_NUM_THREADS={threads}' 'my_command'

@sharkdp
sharkdp enabled auto-merge (rebase) October 7, 2026 20:27
@sharkdp
sharkdp merged commit 6dddb02 into master Oct 7, 2026
17 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.

1 participant