From: Sebastian Gniazdowski <psprint@zdharma.org>
To: zsh-workers@zsh.org
Subject: Optimizer for zwc digest files. B. Viewer for zwc files
Date: Sat, 8 Jul 2017 12:29:36 +0200 [thread overview]
Message-ID: <etPan.5960b410.32fd67f9.4e4d@zdharma.org> (raw)
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
next reply other threads:[~2017-07-08 10:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 10:29 Sebastian Gniazdowski [this message]
2017-07-20 15:01 ` 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=etPan.5960b410.32fd67f9.4e4d@zdharma.org \
--to=psprint@zdharma.org \
--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).