Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Optimizing (z)-flag
- X-seq: zsh-workers 44650
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Optimizing (z)-flag
- Date: Sun, 11 Aug 2019 21:20:11 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=di9SStDBJg+bHJ1Wj0yqqxADRLr2k7yDww+ZWWkoitI=; b=azkvt2Kzj9MGcdr/ltXEN5PNlz7Tyertk/QjkexWkMD0+GA0+9VCpeOPPNOZdr6Xeq S2u5O1CTA8jJOjlY2mxM1dhBiTbN6icPTjz0zoB/MH4Ck1cI5GyiqOS6caR8dqnZ5arL TdppLiHMkWKn2Q/lA/x9MHMf4wm1s8nhIgQqXOZ5nlJTL+fMS6vvXFwsgNpqCqBW9CpB MrtlotcYnnYkXrbARdqbU1c9kFb/s7RQ9FXnhXTIQdoLVPAidTd+p9V+3Ul7NozX++/c W14zLhbdgN4//zr1iUPKe7AiTDrEMpplPIhubLKk84V6Okk/cemJuLAuauc1hRnYhq36 ugmA==
- In-reply-to: <CAH+w=7ZMSwpD6-c43Q-80oRM7qkQahOJ1VFpm8h+mFkXRwB4rg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDsoqFRB3m73ppmE2HqxT6kkUhDRHMWWp2OLdPK3VFFLw@mail.gmail.com> <CAH+w=7ZMSwpD6-c43Q-80oRM7qkQahOJ1VFpm8h+mFkXRwB4rg@mail.gmail.com>
On Sun, 11 Aug 2019 at 20:37, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> You're going to want to look at bufferwords in Src/hist.c. If memory
> allocation is the problem (of which I'm not convinced) it's probably
> ...
Yeah, it does things properly – via a linked list. So appends are
fast. At the end it converts the list into an array via:
aval = hlinklist2array(list, 0);
which does things properly too. I'm not sure why I've had the
impression that (z) is somewhat slow, for a zshrc with 20001
characters it runs in:
( a=(${(z)buff}) ; ) 0,00s user 0,00s system 83% cpu 0,005 total
which is a very good time. It was probably when I was optimizing
fast-syntax-highlighting and a time like 100 ms seemed large.
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author