In my terminal emulators I'm fond of running Fish, in MSYS2/UCRT64 or a Linux VM (Ubuntu or Debian), and even just the default prompt takes a noticeable delay to print.
I made my own prompt which guarantees you see the current working directory, the last error code, and for the same directory keeps a constant line width (so it's easy to go through many lines to find the status code, without it sticking out too sorely). However, when written in the Fish shell language, it's as slow if not slower than the default prompt, which is unbearable during frequent use.
This is an attempt at optimising said prompt and rewriting it in C. I compile it with the most speed-focussed optimisation flag, which for Clang is -Ofast. The reduced delay has been a huge relief to see as I'm already using this as my prompt, but I'd like to push it further. NOTE: Takes an argument, the last command status. I noticed fetching $status then running the script with it as the argument caused a slowdown compared to not, so I'm tempted to make a shell with this prompt built in to remove that performance effect.