Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: One more heap optimization trick for zsh < 5.2
- X-seq: zsh-users 21521
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: One more heap optimization trick for zsh < 5.2
- Date: Sun, 8 May 2016 09:35:30 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=g9GZ+wAq0qlQ1pd0I+hJSaMOClduS77AN8nxrhfPPmU=; b=RPVUDPMkhvpEYAtz9eC/F8gLaKKMUZysTkroivLjyF8VU653Hglo3HQ6djwECl8DYu YkvpBc7aGnkkq7GuFgHNT/IMLfplwhe7l6L9cBvDx9JO6UbyjC09X+0d7zuYLcsXwilh wZ8EJuNf2pJS+IiE7+PP0/jrVtXbTl0cVCJMaATSKvOzUjzO7tUkWKqmRohYJQqouPHp /9AiyjOwbuomFO9pl+10SL12ANWTPR9CmmPQlqKqvGbU3MBFnt78pUHjdhU6g3IMgbni o95qp+obO1mcSA2K7X4AgM9H1VgRRQR/Q+iZkY68eslk9tDdOIGjiS6nDTnH+ISC71nM US0g==
- In-reply-to: <CAKc7PVDRk2hx9i0T62fnD=v__1RbB9sPr5ni_mHXLojVa4sotA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDRk2hx9i0T62fnD=v__1RbB9sPr5ni_mHXLojVa4sotA@mail.gmail.com>
On May 8, 11:34am, Sebastian Gniazdowski wrote:
} Subject: One more heap optimization trick for zsh < 5.2
}
} repeat 1; do
} list=( "${(@M)list:#(#i)*$~search_pattern*}" )
} done
}
} I've recently found my system to be less responding to this trick.
Is $list getting larger e.g. you are accumulating more shell history
to be searched or the like? IIRC the "repeat 1" trick caused a new
heap arena to be pushed instead of searching for free space in an
existing heap, but if $list is large enough to need multiple heap
arenas you may end up right back in the free space hunt.
} I thought that there's maybe an even better way
} to change how heap works for given operation?
If the size of $list is indeed the deciding factor here, I would
suspect that you're now running into heap management during the
pattern match against $~search_pattern, and there's really nothing
at the level of shell coding that can change pattern match behavior.
But all of that is speculation.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author