diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-23 15:01:15 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-23 15:01:15 -0600 |
| commit | 4dbcdf3d5cebcefc86e672ee6da9d32cce07a75b (patch) | |
| tree | f80857f78415a48071409550eeb0dac711e0cbe4 | |
| parent | f3f15fb1602bb5402ed65755abdd7d610ac4ce23 (diff) | |
| download | zash-4dbcdf3d5cebcefc86e672ee6da9d32cce07a75b.tar.gz | |
docs: label the z/OS bench column "z/OS sh"
| -rw-r--r-- | README.md | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -247,16 +247,16 @@ two that look most like the scripts this shell is for. Running an external command costs zash about what it costs dash on Linux, where `fork()` is cheap. On z/OS it is not, and that is where the gap opens. The same benchmarks on z/OS (ASCII build), run -as `sh bench/run.sh $(pwd)/zash /bin/sh bash zsh oksh`. The `sh` column is -IBM's `sh` on z/OS, the shell shipped as `/bin/sh`. It is of the ksh88 -lineage, not ksh93 (its usage string is `sh [-abCefhikKLmnprtuvx]`, and it -rejects `${.sh.version}`), so `[[ ]]`, `let` and `typeset -i` are measured -against it, and the `(( ))` command, which ksh93 added, is `n/a` there: -IBM's `sh` reads `((1))` as two nested subshells and reports -`1: FSUM7351 not found`. `run.sh` prints that column's label as `ksh88`, -after the shell it derives from: +as `sh bench/run.sh $(pwd)/zash /bin/sh bash zsh oksh`. The `z/OS sh` column is +IBM's `sh`, the shell shipped there as `/bin/sh`. It is of the +ksh88 lineage, not ksh93 (its usage string is +`sh [-abCefhikKLmnprtuvx]`, and it rejects `${.sh.version}`), so `[[ ]]`, +`let` and `typeset -i` are measured against it, and the `(( ))` command, +which ksh93 added, is `n/a` there: IBM's `sh` reads `((1))` as two nested +subshells and reports `1: FSUM7351 not found`. `run.sh` prints that +column's label as `ksh88`, after the shell it derives from: -| benchmark | zash | sh | bash | zsh | oksh | +| benchmark | zash | z/OS sh | bash | zsh | oksh | | --- | --- | --- | --- | --- | --- | | `$(builtin)` x 40000 | 0.04 | 19.55 | 283.14 | 225.96 | port bug | | function calls | 0.08 | 0.68 | 1.12 | 0.60 | 0.52 | @@ -287,10 +287,10 @@ after the shell it derives from: The gap is process creation: every command substitution and pipeline stage costs a full z/OS spawn there, from 14 s (bash, 2000 commands) to 283 s (bash, 40000 substitutions). zash does those substitutions and -`print`/`echo` pipeline stages in-shell, so its rows stay near the `sh` -column's, which is what z/OS shops already pay. Plain external commands -cost zash what they cost `sh` (0.57 against 0.52), so nothing was traded -away for the rest. +`print`/`echo` pipeline stages in-shell, so its rows stay near the +`z/OS sh` column's, which is what z/OS shops already pay. Plain +external commands cost zash what they cost `sh` (0.57 against 0.52), so +nothing was traded away for the rest. A `fork()` costs more on z/OS than a `spawn()`, because the fork copies the address space where the spawn can share it. That used to be visible |
