> You can test this by running the following two lines in a terminal:
>
> echo $'#!/bin/sh\necho Hello' > /tmp/test.sh && chmod a+x /tmp/test.sh
> time /tmp/test.sh && time /tmp/test.sh
Am I missing something here?
I just did this, and the timing between the first and second run was barely noticeable -- in fact, the first run was slightly quicker:
> echo $'#!/bin/sh\necho Hello' > /tmp/test.sh && chmod a+x /tmp/test.sh time /tmp/test.sh && time /tmp/test.sh
> Hello
> /tmp/test.sh 0.00s user 0.00s system 55% cpu 0.006 total
> Hello
> /tmp/test.sh 0.00s user 0.00s system 41% cpu 0.010 total
This is on macOS 10.15.4.