<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/tests, branch perf/cd-inproc</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=perf%2Fcd-inproc</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=perf%2Fcd-inproc'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-26T00:53:39Z</updated>
<entry>
<title>perf: restore cwd after a lone ( cd dir ) in-process</title>
<updated>2026-11-26T00:53:39Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T00:53:39Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=93bbcf2f9a75bb5090d96ec9908594e15aa5908b'/>
<id>urn:sha1:93bbcf2f9a75bb5090d96ec9908594e15aa5908b</id>
<content type='text'>
A subshell whose body is a single cd now runs in the parent shell with
the directory, PWD, OLDPWD and curdir saved and restored, instead of
forking. On z/OS a fork costs ~0.4 ms there; the cd itself costs ~5 us.
A readonly, integer or dynamic PWD/OLDPWD keeps the forked path.
</content>
</entry>
<entry>
<title>docs: name the system by release, not by its hostname</title>
<updated>2026-11-25T05:14:17Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T05:14:17Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=44252281ec0044cc816f0b3c384e35cfe5dd8469'/>
<id>urn:sha1:44252281ec0044cc816f0b3c384e35cfe5dd8469</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Wording pass on the 64-bit start-up write-up (#17)</title>
<updated>2026-11-25T03:05:17Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T03:05:17Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=4e2be21ad459e9622bfdb30f9daf04f547cdf86a'/>
<id>urn:sha1:4e2be21ad459e9622bfdb30f9daf04f547cdf86a</id>
<content type='text'>
* notes: plainer wording in the 64-bit start-up write-up

Same findings, less staging: no dash-as-connector, no bold cell, no
"not X but Y" contrast, and one space after a full stop like the rest
of the file.  Also fixes "4-5 orders of magnitude" for a 5x difference.

* tests: clang-format spawn.c</content>
</entry>
<entry>
<title>Measure why 64-bit start-up is slow, and record the answer (#16)</title>
<updated>2026-11-25T01:52:27Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T01:52:27Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=c0e48819c3077ccc020deb8b9ffe9de9911ab3d2'/>
<id>urn:sha1:c0e48819c3077ccc020deb8b9ffe9de9911ab3d2</id>
<content type='text'>
* bench: time one start with a parent that is not an LE program

`bench/startup.sh` times a shell loop, so on z/OS every child pays the
31-bit shell's own price and the 64-bit start-up cost cannot be
separated from it.  `tests/tools/spawn` forks one child at a time and
reports wall and child CPU per start, and `bench/le-init.sh` builds the
31-bit, 64-bit and HLASM programs it times in a work directory, so the
table needs nothing checked in but the script.

The child's environment is built by hand and passed to `execve`:
`putenv` after LE has initialized is not handed to the child, and
`_CEE_RUNOPTS` exported to an LE parent makes that parent's `execl`
fail, which a fork loop that does not check exit status reports as a
fast start.

* notes: the 64-bit start-up cost is LE waiting, not the address mode

Measured on the CBT z/OS 29.00 system: a 64-bit HLASM program with no
LE starts in 1.39 ms, the same source at -m32 in 1.5-1.8 ms, so the
address space, the loader and XPLINK are free.  A -m64 start spends
4.5-28 ms before the first instruction of main, of which only 1.0-1.25
ms is charged to the child: the rest is wall time on something shared,
which does not overlap between concurrent starts while it is at 28 ms
and does once it drops to 5.8 ms.  No _CEE_RUNOPTS option moves it.

That retracts an earlier POSIX(OFF) result in these notes: exporting the
option to an LE parent makes its execl fail, so the run timed failed
execs.  Applied to the child, POSIX(OFF) changes nothing.</content>
</entry>
<entry>
<title>Merge pull request #15 from skurtz97/bench/startup</title>
<updated>2026-11-24T23:53:26Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-24T23:53:26Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=70efa08c0698bac43f0f5a0c5365e696613ac1e6'/>
<id>urn:sha1:70efa08c0698bac43f0f5a0c5365e696613ac1e6</id>
<content type='text'>
bench: measure start-up wall time against the other shells</content>
</entry>
<entry>
<title>bench: measure start-up wall time against the other shells</title>
<updated>2026-11-24T22:33:33Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-24T22:30:56Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=a36e053993ce116fba0c375b1b6ac44e1d118e51'/>
<id>urn:sha1:a36e053993ce116fba0c375b1b6ac44e1d118e51</id>
<content type='text'>
run.sh times CPU, so the milliseconds a process spends before it runs
anything never appear in it: zash can read 0.00 in a subshell row while
zash -c : costs a few ms of wall time.  bench/startup.sh measures that
directly, one start per command, and bench/README.md now has a table
instead of a warning that the number is missing.

The clock is tests/tools/now.c, ten lines, because /bin/date on z/OS
has no sub-second format.
</content>
</entry>
<entry>
<title>test: keep child reports out of the leak comparison</title>
<updated>2026-11-24T22:28:51Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-24T22:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=8af98745d400735363a9b98165e73aca18523f7f'/>
<id>urn:sha1:8af98745d400735363a9b98165e73aca18523f7f</id>
<content type='text'>
A child inherits _CEE_DMPTARG and writes its own heap report, so the
substitution and the pipeline added a report per iteration: growth
measured 2 MB over 900 children, none of it zash's.  The forked
commands now turn heap checking off for themselves, and the test fails
if anything but one report came back.
</content>
</entry>
<entry>
<title>test: leak-check the spawn, redirection and pipeline paths too</title>
<updated>2026-11-24T22:25:02Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-24T22:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=1bdde91c6849114dcc65503f6a2325d22217c74b'/>
<id>urn:sha1:1bdde91c6849114dcc65503f6a2325d22217c74b</id>
<content type='text'>
The loop body had builtins only, so nothing but parsing, expansion and
variables was measured.  A substitution, a redirection, a forked
command and a pipeline per iteration put the storage those paths keep
under the same comparison.
</content>
</entry>
<entry>
<title>Merge pull request #14 from skurtz97/test/zos-leakcheck</title>
<updated>2026-11-24T22:22:02Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-24T22:22:02Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=51467fc9a631580719630512e3c70034f7ff0d87'/>
<id>urn:sha1:51467fc9a631580719630512e3c70034f7ff0d87</id>
<content type='text'>
test: fail when zash leaks under LE's heap checker</content>
</entry>
<entry>
<title>test: report leak checking as a verdict, not an exact figure</title>
<updated>2026-11-24T21:04:07Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-24T21:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=e633a576ec28f4788f842273fc60adab6999b7dc'/>
<id>urn:sha1:e633a576ec28f4788f842273fc60adab6999b7dc</id>
<content type='text'>
The growth over 10x the work is 0 or 8 bytes depending on how the
environment copy lands on an 8-byte boundary, so printing it made the
expectation depend on the caller's environment.  Print the finding only
when the limit is exceeded; the reports in build/leaks keep the
numbers.
</content>
</entry>
</feed>
