* Optimizer for zwc digest files. B. Viewer for zwc files
@ 2017-07-08 10:29 Sebastian Gniazdowski
2017-07-20 15:01 ` Sebastian Gniazdowski
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2017-07-08 10:29 UTC (permalink / raw)
To: zsh-workers
I have a super cool technique – extraction of functions from scripts. Currently, for 13 plugins that I use, I have automatically extracted that much functions:
ls ~/.zplugin/lexicon | wc -l
55
So, a lexicon of functions, compiled to `lexicon.zwc` digest, loaded with `autoload -w lexicon.zwc`.
B. Has anyone a word-code viewer, that would output op-codes, strings?
A. I need to optimize such digest-zwc. The optimization can target specific functions, not necessarily all possible variants.
With OS X "Instruments" (profiling tool), I have established that in general, CPU time is spend mostly in prefork(), addvars(), stringsubst().
Can word-code be modified (in second pass after zcompile), so that prefork(), addvars(), etc. are called less often? Maybe it's about doing more at compile time, less at run time? If I gain 20 ms, then I'll aprove lexicon.zwc into Zplugin.
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-20 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-08 10:29 Optimizer for zwc digest files. B. Viewer for zwc files Sebastian Gniazdowski
2017-07-20 15:01 ` Sebastian Gniazdowski
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).