diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 21:25:47 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 21:25:47 -0600 |
| commit | ab003863f9a3eaf6099d560af64022b7bd7c2f2a (patch) | |
| tree | a5551d9e19c117281807834b2a7cfce27740eb70 /DESIGN.md | |
| parent | 1109062b7c8418026fc5461f81cd98632f5e5658 (diff) | |
| download | zash-bench/startup-rounds.tar.gz | |
bench: make the start-up number a minimum of interleaved roundsbench/startup-rounds
startup.sh ran BENCH_N starts once, and on the shared z/OS machine the
same binary measured anywhere between 5 and 14 ms depending on the hour.
Now each cell is the fastest of BENCH_R rounds (default 5) of BENCH_N
starts, and a row's two columns are measured one after the other inside
each round, so `-c :` and `script` see the same load instead of one
following five rounds of the other. A minimum is the right summary
because contention only adds time.
Measured that way on cbt today, zash is 1.34 ms for `-c :` and 1.36 ms
for a script, and the z/OS sh 2.16 and 2.18 — the same two numbers
bench/README.md already claimed from a quieter machine, which is the
point: the method now reproduces them.
Also records the rule the ksh88 constraint implies: where zash and the
z/OS sh disagree, zash keeps the better behaviour unless a ksh88 script
could observe it, and the one such case — a failed redirection,
assignment or read being 2 rather than 1 — is accepted because POSIX
does not pin it and the shells disagree among themselves.
Diffstat (limited to 'DESIGN.md')
| -rw-r--r-- | DESIGN.md | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -841,6 +841,13 @@ Rules: fields, and `command eval` still exiting on an error. `bench/README.md` classifies every difference the two shells show on the `tests/posix` corpus, and none of them is a zash bug. +- The rule behind those two bullets: where zash and the z/OS `/bin/sh` + disagree, zash keeps the better behaviour as long as a script written + for IBM's ksh88 cannot tell the difference. The one case where it can + is the status of a failed redirection, assignment or `read`: 2 here + and 1 there. That stays, because POSIX does not pin the value and the + shells disagree among themselves (bash says 1, dash and FreeBSD sh + say 2), so no portable script can test for it. - An expansion error in a command the shell prepares for a child (a pipeline stage, `&`, `$( )`) is reported on the shell's stderr, not on the stderr that command would have had. |
