Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Timing function execution



Thanks for the ideas everybody!

I may write up my own "timer" wrapper that uses $EPOCHREALTIME for the benchmarking.

Zach Riggle



On Sat, Nov 6, 2021 at 2:02 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
On Sat, Nov 6, 2021 at 11:44 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> Does this mean that `time foo` could work for functions (or rather any
> "list")? That would be nice.

It's a bit more complicated than that; "time" with is handed fairly
deep in the exec.c call stack, with a special case for an empty list,
and actually requesting/printing the data when there is a list is
passed off to the SIGCHLD handler, so it would take a bit more
untangling than I'm going to dive into.


Messages sorted by: Reverse Date, Date, Thread, Author