4 ms·
Their "see!" shell script example is a bit rubbish because I get 0.012s, 0.005s on this Mac laptop whilst getting 0.022s, 0.023s on Linux box 1 and 0.006s, 0.00
by zimpenfish 6y ago
Their "see!" shell script example is a bit rubbish because I get 0.012s, 0.005s on this Mac laptop whilst getting 0.022s, 0.023s on Linux box 1 and 0.006s, 0.006s on Linux box 2.
Changing the filename to test2.sh on the Mac (which should trigger the delay, right?) gets 0.006s, 0.006s.
I don't think the shell scripts are doing what they claim (and wouldn't the second run be faster anyway because of caching?)
- egorfine 6y agoIf they are caching based on inode, this will not invalidate the cache. Do cp test.sh test2.sh and try again.
- saagarjha 6y agoI feel like cp might do an APFS CoW and this might still cause problems…
- ken 6y agoNo, even "cp -c" creates a new inode.
- zimpenfish 6y agoSorry, when I said "changing the filename to test2.sh", I meant in the commands run, not `mv test.sh test2.sh`. i.e. I have both `test.sh` and `test2.sh` in `/tmp` now.