all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Improving regexp-opt
Date: Fri, 12 Apr 2019 12:53:06 -0400	[thread overview]
Message-ID: <jwvd0lrp3t8.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: CAARdmY0VxaC9LdACyv_uzGZ-9Sinj3BmknwFGR6dWvGk21gtkQ@mail.gmail.com

> The pros:
> If the resulting strings "came from" a regexp that is splittable, the
> FA implementation always simplifies to it.  In pratice, these are
> uncommun, and in most cases, the results are equivalent.
>
> The cons:
> The algorithm for FA seams to have greater computation complexity,
> takes about 20 times to compute in average.

Furthermore, even when the result is noticeably shorter, have you
compared the performance of the regexp-matcher?  I expect that you won't
be able to see a measurable difference there.

IOW it's just not a good deal.

As I said, if you really want to improve on regexp-opt, you have to go
through a *real* DFA and that means not returning a regexp but a DFA, so
it's a completely different beast from `regexp-opt`.


        Stefan




  parent reply	other threads:[~2019-04-12 16:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 16:41 Improving regexp-opt Miguel V. S. Frasson
2019-02-08  3:48 ` Stefan Monnier
2019-04-12 15:06   ` Miguel V. S. Frasson
2019-04-12 15:40     ` Miguel V. S. Frasson
2019-04-12 16:53     ` Stefan Monnier [this message]
2019-04-18  0:59       ` Miguel V. S. Frasson
2019-04-18  3:49         ` Stefan Monnier

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=jwvd0lrp3t8.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.