zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: 6-pws-2
Date: Tue, 31 Aug 1999 10:22:20 +0200 (MET DST)	[thread overview]
Message-ID: <199908310822.KAA27325@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Mon, 30 Aug 1999 18:00:22 +0200


Peter Stephenson wrote:

> - I haven't looked at the speed of the new pattern matching code.  If case
>   statements with *only* simple strings are slower, there's not much I can
>   do since it's already optimised to a strcmp(), though I think I can speed
>   up the string-building loop in patcompatom().  In other cases I can think
>   of a few tweaks.

I think we could

1) come back to my old suggestion to optimise some common patterns
   (like *str, str*, *str*, s1|s2|s3) in the same way non-pattern
   strings are already optimised
2) probably add caches for parsed patterns (e.g. give patcompile() an
   optional pointer to a patcache struct which would contain the
   strings and compiled pattern of the last few patterns used at the
   call site and make patcompile() first look there)
3) store compiled patterns in the execution tree (for now I'm only
   thinking about `case', `[[ .. = .. ]]' and `[[ .. != .. ]]' if the
   patterns don't need to be singsub()ed, which could be checked at
   parse time)

I haven't tried any of these so I'm not sure if they are worthwhile
and easy (and small) enough to implement. Just some thoughts.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-08-31  9:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-31  8:22 Sven Wischnowsky [this message]
1999-08-31 11:28 ` 6-pws-2 Andrej Borsenkow
1999-08-31 17:10 ` 6-pws-2 Bart Schaefer
1999-09-01  8:24 ` 6-pws-2 Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
1999-09-01  8:46 6-pws-2 Sven Wischnowsky
1999-08-31 12:38 6-pws-2 Sven Wischnowsky
1999-08-31 16:19 ` 6-pws-2 Tanaka Akira
1999-08-31  8:15 6-pws-2 Sven Wischnowsky
1999-08-31 21:05 ` 6-pws-2 Bart Schaefer
1999-08-30 16:00 6-pws-2 Peter Stephenson
1999-08-30 21:03 ` 6-pws-2 Bart Schaefer
1999-09-01  8:09   ` 6-pws-2 Peter Stephenson
1999-08-31  3:37 ` 6-pws-2 Tanaka Akira
1999-08-31  9:27 ` 6-pws-2 Ollivier Robert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199908310822.KAA27325@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).