zsh-users
 help / color / mirror / code / Atom feed
From: Zach Riggle <zachriggle@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Roman Perepelitsa <roman.perepelitsa@gmail.com>,
	Zsh Users <zsh-users@zsh.org>
Subject: Re: Timing function execution
Date: Sat, 6 Nov 2021 15:37:32 -0500	[thread overview]
Message-ID: <CAMP9c5nBWQASWxe-WYAF7mmJx+F6NojoxYKLyNOhf+Ei_1mQug@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7Y4dUKvFPEbL28ebnLRx8Qxb9swLGW9Wq_na1C_V3BTfg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 740 bytes --]

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@brasslantern.com>
wrote:

> On Sat, Nov 6, 2021 at 11:44 AM Roman Perepelitsa
> <roman.perepelitsa@gmail.com> 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.
>

[-- Attachment #2: Type: text/html, Size: 1388 bytes --]

      reply	other threads:[~2021-11-06 20:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-06 12:11 Zach Riggle
2021-11-06 16:15 ` Bart Schaefer
2021-11-06 16:21   ` Roman Perepelitsa
2021-11-06 18:17     ` Bart Schaefer
2021-11-06 18:35       ` Bart Schaefer
2021-11-06 18:40         ` Bart Schaefer
2021-11-06 18:43           ` Roman Perepelitsa
2021-11-06 19:01             ` Bart Schaefer
2021-11-06 20:37               ` Zach Riggle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMP9c5nBWQASWxe-WYAF7mmJx+F6NojoxYKLyNOhf+Ei_1mQug@mail.gmail.com \
    --to=zachriggle@gmail.com \
    --cc=roman.perepelitsa@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).