From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28843 invoked by alias); 8 May 2016 16:34:48 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21521 Received: (qmail 16086 invoked from network); 8 May 2016 16:34:45 -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=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=g9GZ+wAq0qlQ1pd0I+hJSaMOClduS77AN8nxrhfPPmU=; b=eyy8h91UaQ49gKpNj2EjRj7G0CUG3pDArfcvJjxaJXA0UaThdGNIlJEhQn+vlUtB72 3OQVDubYgXF4oTb5DkMQMEf7tUV51RaO3YZ1+zM/Iaw4gpkkSYgDQIkfZyhFNCmUw6br wL2SNZRH/YOrgcuEeMuHe14rIv/CFQqCof1gMiLYOGCq93pBa5jtDTgqL0rtYevGSrIe BdplOJqFefV/td/vDndRKik0HOnz+d6eHuetrajDQxUaCcxT4wbyp1r9eoRZ3co9QKS9 9P6hom/gDPShf3Wr+8uLEibd/XK+yxbmqUEMKrdT/k9zUsW2JMWROjJCjfvc5ZxKET4Z 2i4Q== X-Gm-Message-State: AOPr4FUpiBEIb8O8EKSSz2LMkZb2dVnWSq8lCknnkFz7WOgiHE4QufH8TQccfmxPxXnT8w== X-Received: by 10.66.1.135 with SMTP id 7mr44349974pam.106.1462725282650; Sun, 08 May 2016 09:34:42 -0700 (PDT) From: Bart Schaefer Message-Id: <160508093530.ZM9686@torch.brasslantern.com> Date: Sun, 8 May 2016 09:35:30 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "One more heap optimization trick for zsh < 5.2" (May 8, 11:34am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: One more heap optimization trick for zsh < 5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.