From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23159 invoked by alias); 8 Jul 2017 10:29:50 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41404 Received: (qmail 22801 invoked from network); 8 Jul 2017 10:29:50 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(85.128.245.120):SA:0(0.0/5.0):. Processed in 2.120103 secs); 08 Jul 2017 10:29:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at zdharma.org does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new using ClamAV (21) Date: Sat, 8 Jul 2017 12:29:36 +0200 From: Sebastian Gniazdowski To: zsh-workers@zsh.org Message-ID: Subject: Optimizer for zwc digest files. B. Viewer for zwc files X-Mailer: Airmail (442) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I have a super cool technique =E2=80=93 extraction of functions from scri= pts. Currently, for 13 plugins that I use, I have automatically extracted= that much functions:=C2=A0 ls =7E/.zplugin/lexicon =7C wc -l=C2=A0 55=C2=A0 So, a lexicon of functions, compiled to =60lexicon.zwc=60 digest, loaded = with =60autoload -w lexicon.zwc=60. B. Has anyone a word-code viewer, that would output op-codes, strings=3F A. I need to optimize such digest-zwc. The optimization can target specif= ic functions, not necessarily all possible variants. With OS X =22Instruments=22 (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 prefor= k(), addvars(), etc. are called less often=3F Maybe it's about doing more= at compile time, less at run time=3F If I gain 20 ms, then I'll aprove l= exicon.zwc into Zplugin. -- =20 Sebastian Gniazdowski psprint /at/ zdharma.org