Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Possible huge setarrvalue optimization



-------- Original Message --------
Subject: Re: Possible huge setarrvalue optimization
Local Time: December 24, 2016 6:19 PM
UTC Time: December 24, 2016 5:19 PM
From: d.s@xxxxxxxxxxxxxxxxxx
To: Zsh hackers list <zsh-workers@xxxxxxx>
Sebastian Gniazdowski <psprint@xxxxxxxxxxxx>

Bart Schaefer wrote on Sun, Nov 20, 2016 at 09:41:48 -0800:
> This and the proposed getstr optimization both make me nervous. I know
> Sebastian is anxious to have them appear in the next release, but it feels
> and if we should have more time using them in dev branches.

I assume we can go ahead now.

Here's a revised patch based on my review upthread:

You then wrote:

"Should this line check that «v->pm->gsu.a.setfn == arrsetfn»?

Should this line check that «pm->ename == NULL» [since arrsetfn()
handles such arrays specially]?"

I think both propositions are good, especially the ename check – activated when parameter is being automatically exported – if I understand correctly. You could fix this by including code activated in the normal setter when ename is not null – like Peter did with string optimization. This way auto-exported arrays will still be optimized.

Best regards,
Sebastian Gniazdowski


Messages sorted by: Reverse Date, Date, Thread, Author