Skip to content

Releases

psh 1.0.0-rc0 (zsh 5.9.2)

Choose a tag to compare

@kekePower kekePower released this 10 Nov 14:35

psh 1.0.0-rc0

Performance SHell, based on Zsh 5.9.2.

This is the first public source release candidate of psh. It grew out of Zsh
applications: editors, chat clients, terminal interfaces and graphics experiments
that do substantial work inside the interpreter. The goal is to run that work
faster while keeping existing Zsh behavior familiar and dependable.

rc0 brings together 27 accepted optimizations, six bundled companion projects,
an isolated installer, and the tests and measurements behind the changes.
It is ready for wider testing with your own scripts and interactive setup.

Highlights

  • Guarded fast paths for array access, append and search; metafied strings;
    ASCII/multibyte traversal; patterns; substitutions; numeric conversion and
    option emulation.
  • Indexed local-parameter cleanup avoids visiting unrelated globals on eligible
    function returns. Existing native modules retain a conservative fallback.
  • zdraw, zjson, zcurl, zmdown, zhtml2md and zoup are included as pinned sources,
    with native components built against the matching psh SDK.
  • The packaged executable keeps debugger symbols separately. On the validation
    host it is 854,680 bytes; a larger unstripped core trial is expected.
  • Arithmetic state/ownership documentation and new recursive error-recovery tests
    support further maintenance. The latest cleanup preserves the complete core
    machine code and all 40 native-module text sections.

The upstream-maintainer scalar-search bounds fix reported during this work is
included separately from the performance changes. Rejected experiments and
slower controls remain in the development history.

Measured on real project workloads

Fresh comparisons use unmodified upstream Zsh 5.9.2 and the accepted psh release
build, GCC 15.2.0, -O2 -g, assertions disabled, multibyte/dynamic modules and
PCRE2, on an AMD Ryzen 9 5950X running Mageia 11 x86-64. Each pass uses nine
alternating samples on CPU 13 in C.UTF-8 and checks matching result state.

Offline kernel Reference time / psh time, across two passes
zcoder paste/edit batch 1.18–1.20×
zcoder wide-character layout 1.85–1.86×
zchat wide-character layout 1.86–1.88×
Endgame world update 1.21×
Mario simulation 1.60–1.61×
zfetch URL encoding 3.30×
Bundled zjson array parsing 1.20–1.22×
Bundled zjson array encoding 1.19–1.21×

These are specific, warm interpreter-heavy kernels. They do not measure complete
UI startup, external-command or network performance, or every Zsh script.
There is no aggregate shell-speed claim. All samples, cases, source fingerprints,
build settings and the repeat pass are in the benchmark record.
The bundled JSON measurements can be reproduced from the source archive alone.

Compatibility and validation

psh --version reports psh 1.0.0-rc0 (zsh 5.9.2). $ZSH_VERSION remains
5.9.2; stock modules keep their zsh/* names and personal Zsh startup filenames
retain their meaning. The installer uses separate psh paths and global
configuration, leaving stable Zsh and the account login shell unchanged.

Oh My Zsh working unchanged is a release requirement. The accepted build
passes 24 real interactive sessions with the configured theme/plugins/highlighter,
completion, history, prompt, async and Ctrl-C checks. Framework code is unmodified.
Coverage applies to the tested configurations; universal drop-in compatibility
with every script, plugin, native module and platform has not been established.

The accepted production sources have passing GCC and Clang upstream suites
(63 scripts, zero failures, two skips), seven package suites, 195,600 arithmetic
comparisons across five locales, and focused native/Memcheck checks. Debug builds
pass their corresponding 62-script suites. The latest maintenance record
and compatibility policy describe scope and limits.

Native modules should be built and tested with the matching SDK. Direct array
mutation that bypasses the supported getters/setters has a documented ownership
constraint. Loading an unacknowledged native module selects legacy scope scans
for that process. Read the compatibility policy when integrating native code.

Try it without installing

Use the attached psh-1.0.0-rc0.tar.xz and verify it with SHA256SUMS.
This source archive includes the verified upstream baseline and SOURCE-INFO.json;
it builds without Git history. GitHub's automatic source snapshots do not include
the extra baseline archive.

tar -xf psh-1.0.0-rc0.tar.xz
cd psh-1.0.0-rc0
python3 Perf/build.py --which candidate --profile release
./psh --version
./psh -f

The core trial needs Python 3.12+, a C toolchain and the appropriate Zsh build
dependencies. It uses the extracted directory, retains debugger symbols and
does not install a system shell. Debug remains the default development profile;
release/debug and pristine/candidate builds use separate native-module runtimes.

For the complete distribution with all six companions, follow the
bundled installation guide, including its dependency
list and verification steps. The activation gate requires an Oh My Zsh checkout
for testing even if you do not use the framework daily; it uses isolated test
homes. The core trial above does not require Oh My Zsh.

The bundled Linux installer is validated on the host described above. Other
platforms can try the core build but are experimental. This release provides
source, not a distribution-independent prebuilt binary. The source validation
report accompanies the archive and covers extraction outside Git, both core
profiles and staging both complete package profiles without installation.

Help test rc0

Try your scripts and your normal interactive setup. A working Zsh script that
fails under psh deserves investigation. Please report a minimal reproducer
with both versions, operating system, locale/options, expected versus actual
output/status, and the build ID or SOURCE-INFO.json commit. Keep credentials
and private startup files out of reports.

Thanks to the Zsh contributors whose work makes this fork possible, and to Mikael
Magnusson for the upstream scalar-search fix. Upstream and component notices
remain intact; see LICENCE, LICENSE and the vendor
notices. The earlier private rc0 checkpoint
is retained separately from this public candidate.


Source: e7253187fb07.
Download the attached source archive and verify it with SHA256SUMS; release.json and SOURCE-INFO.json record its exact identity.