zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Is large `if' or `case' statement a potential cause of a slow-down?
Date: Tue, 12 Jun 2018 19:27:59 +0200	[thread overview]
Message-ID: <CAKc7PVBLD7M-aFqy_jPHsmscst3n6XP+VnNZi_MBdLaLyUpMFw@mail.gmail.com> (raw)

Hello,
a project (f-sy-h) suffers from what I call a "big-loop". I will
rewrite it with a trick soon to check, but I though, why guess that a
big loop, `if' or `case' are not easy for Zsh engine, while I can ask.
Does someone know a potential marauder script constructs, more
difficult than less difficult for Zsh execution? Is big-loop/if/case
among them? I recall Bart mentioned that long assignment statements in
zcompdump are pretty much slow, IIRC.

On this occasion, I would ask when are functions compiled? Before
first use, or when defining, or maybe different from these both?
Functions in .zwc digest are of course compiled and do not need
compilation at all (?).

To bump up the stake: when sourcing a compiled script that defines
functions, will there be a wordcode for those function definitions and
will Zsh use it avoiding compilation?
-- 
Best regards,
Sebastian Gniazdowski


             reply	other threads:[~2018-06-12 17:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 17:27 Sebastian Gniazdowski [this message]
2018-06-13 14:57 ` Sebastian Gniazdowski
2018-06-13 15:20   ` Bart Schaefer
2018-06-13 16:43     ` Sebastian Gniazdowski
2018-06-13 19:48   ` Sebastian Gniazdowski

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=CAKc7PVBLD7M-aFqy_jPHsmscst3n6XP+VnNZi_MBdLaLyUpMFw@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-workers@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).