Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh-bench: Benchmark for interactive zsh



I made this: https://github.com/romkatv/zsh-bench

Summary:

- `zsh-bench` measures user-visible latency of interactive zsh: *input lag*,
  *command lag*, etc. You can use it to benchmark your own shell.
- `human-bench` measures human perception of latency when using interactive
  zsh. You can use it to check how it feels to use zsh with specific
  latencies or to test whether you can tell a difference between 5ms and 0ms
  lag.
- I've used `human-bench` to conduct a blind study on myself to find the
  maximum values of latencies that are indistinguishable from zero. For
  example, *command lag* below 10ms feels just like 0ms but anything above
  this value starts feeling sluggish.
- I've used these threshold values to normalize benchmark results to see what
  is fast and what is slow.
- Armed with this set of tools I've optimized two of my zsh projects:
  powerlevel10k and zsh4humans. They used to be fairly fast but now they are
  literally indistinguishable from instantaneous as far as human perception
  goes.
- I've benchmarked many zsh techniques, plugins, frameworks and plugin
  managers and have shared my observations in the document together with a
  brief conclusion.

This is unlikely to be of practical use to many here but hopefully will prove
entertaining to a few.

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author