zsh-workers
 help / color / mirror / code / Atom feed
* Pattern change
@ 2004-10-15  9:27 pws
  0 siblings, 0 replies; 2+ messages in thread
From: pws @ 2004-10-15  9:27 UTC (permalink / raw)
  To: zsh-workers

I'm about to commit the change suggested by Bart that treats the test string for
pattern matching by length instead of assuming null termination.  It doesn't seem
worth posting the patch since it changes large chunks of the file.  There's a new test
in D02glob.ztst for more complicated exclusion patterns involving paths, since
these are specially handled.  All tests still pass.

Potentially this could mean we could unmetafy the string before attempting to match,
which would have advantages.  However, this only makes sense if the pattern itself
uses  unmetafied strings, and that's quite tricky.

Pattern matching still uses memory allocation internally in two places.  First, it
uses it to copy in the start of the path for ~-exclusion.  This can probably be
moved further up by using appropriate flags.  Second, it uses it to avoid pathological
behaviour involving exclusions inside closures; without recording previous endpoints
of matches this can become exponentially slow.  It's possible this can be improved, too,
however.

pws



-- 

Whatever you Wanadoo:
http://www.wanadoo.co.uk/time/

This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm


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

* Re: Pattern change
@ 2004-10-15 10:22 pws
  0 siblings, 0 replies; 2+ messages in thread
From: pws @ 2004-10-15 10:22 UTC (permalink / raw)
  To: zsh-workers

> I'm about to commit the change suggested by Bart that treats the test string for
> pattern matching by length instead of assuming null termination.

This is now committed.

> Pattern matching still uses memory allocation internally in two places.  First, it
> uses it to copy in the start of the path for ~-exclusion.  This can probably be
> moved further up by using appropriate flags.

Fixed this in the meanwhile, too.

I can see how to improve the other case, but it makes it yet more complicated, so
I'm not sure it's worth it.

-- 

Whatever you Wanadoo:
http://www.wanadoo.co.uk/time/

This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm


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

end of thread, other threads:[~2004-10-15 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-15  9:27 Pattern change pws
2004-10-15 10:22 pws

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