#benchmarking

Timing performance of functions in shell scripts

I recently started looking at some shell scripts that run fine on big fast powerful systems (i.e. x86 laptops/desktops), but quite slowly on small slow devices. Using time to run the script (or, the amazing hyperfine) works OK if you're timing the entire script execution, but what do you do if you want to time individual functions within the script?

·Clayton Craft
Timing performance of functions in shell scripts