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

Is large `if' or `case' statement a potential cause of a slow-down?



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



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