1. 10

  2. 2

    I found this by accident while searching for something else entirely and it piqued my interest. The authors of GSH were running builds of autotools using projects, which meant a lot of fork()/exec(), and they were doing this on Windows where fork ()/exec() aren’t too fast443. They report a 2-3x speed up (*1) by writing a new sh implementation that doesn’t spawn actual processes for subshells, and has as builtins a lot of the common commands that are called enough times to be performance critical. By doing these things they’re able to eliminate a lot of process creation, which is relatively expensive on Windows.

    (*1 I’m not sure what the scope of that claim is. I assume it’s for the configure scripts. For the entire build would be a bit outlandish.)

    1. 2

      Autotools is punishing on anything where file I/O and forking is expensive. I’ve had ./configure take an hour and a half to run before. (Make would take ~1 hour at most. That bad.)

    2. 2

      Interesting! Added to https://github.com/oilshell/oil/wiki/Alternative-Shells

      This is one of the few shells focused on the non-interactive use case I’ve seen!