From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: fmatch
Date: Fri, 07 May 2010 13:59:13 +0200 [thread overview]
Message-ID: <87ocgrncry.fsf@gnu.org> (raw)
In-Reply-To: 201005062239.32992.stefan.tampe@spray.se
Hi Stefan,
stefan <stefan.tampe@spray.se> writes:
> I've been experimenting lately with an inline match construct, very much like
> using compiled regexps.
Sounds interesting.
> That is I created a tiny VM that was targeted to do matching. to show
> it consider
>
> guile> (def f ((x y 'a 'b) (+ x y)))
(Such a ‘def’ construct would be less convenient than ‘match’ IMO.)
> large patterns yield a speedup of 15 times acording to my tests compared
> with (ice-9 match).
>
> I used guile-1.9.10. Does this release have a lot of checks compiled in so
> that the comparison is unfair?
All list/pair accessors type-check their arguments (this has always been
the case with Guile so that Scheme code cannot yield to segfaults and
the like.)
> Anyway, I will try to tweak the code even further somthing along
>
> (object-ref 1)
> (fast-match)
> (br L1)
> (br L2)
> (br L3)
> ....
> (br Ln)
>
> Here the fast-match routine can FETCH the br commands and issue them directly
> and hence one can have one compiled pattern in stead of one for each row in
> the matcher.
I don’t quite understand how it differs from what happens without a
‘fast-match’ instruction. Can you show the code for ‘fast-match’?
Thanks,
Ludo’.
next prev parent reply other threads:[~2010-05-07 11:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 20:39 fmatch stefan
2010-05-07 11:59 ` Ludovic Courtès [this message]
2010-05-07 14:24 ` fmatch stefan
2010-05-07 20:23 ` fmatch Ludovic Courtès
2010-05-07 20:53 ` fmatch stefan
2010-05-09 20:57 ` fmatch Ludovic Courtès
2010-05-09 20:52 ` fmatch stefan
2010-05-10 8:26 ` fmatch Ludovic Courtès
2010-05-11 14:26 ` fmatch Stefan
2010-05-17 20:08 ` fmatch stefan
2010-05-22 21:03 ` fmatch Ludovic Courtès
2010-05-22 21:31 ` fmatch stefan
2010-05-23 16:06 ` fmatch Ludovic Courtès
2010-05-23 15:47 ` fmatch stefan
2010-05-24 20:08 ` fmatch Ludovic Courtès
2010-05-24 21:05 ` fmatch stefan
2010-05-25 17:41 ` fmatch Ludovic Courtès
2010-05-25 21:10 ` fmatch stefan
2010-06-16 21:31 ` fmatch Ludovic Courtès
2010-06-20 19:58 ` fmatch stefan
2010-06-20 21:56 ` fmatch Ludovic Courtès
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ocgrncry.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).