From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: 6-pws-2
Date: Tue, 31 Aug 1999 17:10:58 +0000 [thread overview]
Message-ID: <990831171058.ZM16997@candle.brasslantern.com> (raw)
In-Reply-To: <199908310822.KAA27325@beta.informatik.hu-berlin.de>
On Aug 31, 10:22am, Sven Wischnowsky wrote:
} Subject: Re: 6-pws-2
}
} 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)
The cache lookup would have to be awfully fast to make it worthwhile.
I think we'd get a lot more benefit from this:
} 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)
... but even there it'll mostly help loops, not one-pass sorts of things
like sourcing init files.
The ideal thing might be to "incrementally" compile the pattern; do just
enough to start discarding strings that can't possibly match, then do a
bit more upon finding one that might, etc., so parsing and compiling the
full pattern requires encountering the first successful match (unless it's
a really intractible pattern). Master's theses have been written on less
interesting problems ... you aren't looking to get a paper out of this,
are you, Peter?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
next prev parent reply other threads:[~1999-08-31 17:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-31 8:22 6-pws-2 Sven Wischnowsky
1999-08-31 11:28 ` 6-pws-2 Andrej Borsenkow
1999-08-31 17:10 ` Bart Schaefer [this message]
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=990831171058.ZM16997@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--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).