zsh-workers
 help / color / mirror / code / Atom feed
* When is following code being run?
@ 2016-11-12 10:23 Sebastian Gniazdowski
  2016-11-12 11:40 ` Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2016-11-12 10:23 UTC (permalink / raw)
  To: zsh-workers

Hello,
file params.c, line 1572 and following in the else block:

https://github.com/zsh-users/zsh/blob/master/Src/params.c#L1572-L1583

The strlen can be optimized out, as getstrvalue has most probably ran it
already. I wonder about benefits, as there will be probably none, as "
if (pprog && pattry(pprog, d) &&" and similar code consumes probably 95%
of CPU cycles. But would test this, who knows.

-- 
  Sebastian Gniazdowski
  psprint@fastmail.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: When is following code being run?
  2016-11-12 10:23 When is following code being run? Sebastian Gniazdowski
@ 2016-11-12 11:40 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2016-11-12 11:40 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: zsh-workers

Sebastian Gniazdowski wrote on Sat, Nov 12, 2016 at 02:23:04 -0800:
> Hello,
> file params.c, line 1572 and following in the else block:
> 
> https://github.com/zsh-users/zsh/blob/master/Src/params.c#L1572-L1583
> 

The link will bitrot: http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=37966

> The strlen can be optimized out, as getstrvalue has most probably ran it
> already. I wonder about benefits, as there will be probably none, as "
> if (pprog && pattry(pprog, d) &&" and similar code consumes probably 95%
> of CPU cycles. But would test this, who knows.

    zsh -f -c 'foo=bar; : $foo[(r)a]' 

enters that code.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-12 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-12 10:23 When is following code being run? Sebastian Gniazdowski
2016-11-12 11:40 ` Daniel Shahaf

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).