diffoscope appears to repeatedly call programs with `--version`
This is probably not that slow but it is hundreds to thousands of invocations and should probably be memoized.
My suggestion is that for deterministic commands like --version
, there could be a our_check_output
that has a memoization cache by command line.