Fish's execve is slow
OK. Funny story. If you run programs in the Fish shell, it is slow. Try this out yourself.
spawn.c
#include <unistd.h>
int main(int argc, char **argv) {
argv += 1;
execvp(argv[0], argv);
}
hello.clj
(println "hello world")
time bb hello.clj # this is slower than the rest
time /usr/bin/bb hello.clj
clang spawn.c -o spawn
time ./spawn bb hello.clj
If you don’t have Babashka installed, you can probably modify this to use Python.
It turns out Rust doesn’t make everything fast.