From: Lars Ingebrigtsen <larsi@gnus.org>
To: ding@gnus.org
Subject: Re: [PATCH] Optimize regexp build by Group Mail Splitting
Date: Fri, 31 Jan 2014 16:17:44 -0800 [thread overview]
Message-ID: <877g9fit3r.fsf@building.gnus.org> (raw)
In-Reply-To: <877gapocla.fsf@hati.baby-gnu.org> (Daniel Dehennin's message of "Sat, 28 Dec 2013 04:53:37 +0100")
Daniel Dehennin <daniel.dehennin@baby-gnu.org> writes:
> Here is a patch[1] to optimize the regexps build by Group Mail
> Splitting.
>
> It's a little bit slower, as said in my tag message a 100 run benchmark
> on 44 mail groups managed by Group Mail Splitting result in:
>
> - master: Elapsed time: 2.205961s (0.792951s in 9 GCs)
>
> - master+patch: Elapsed time: 2.547914s (1.069562s in 12 GCs)
Hm... I'm not quite sure I understand the patch.
> (setq split-regexp
> (concat
> "\\("
> - (mapconcat
> - 'identity
[...]
> + (regexp-opt
> + (remove nil
> + (append
> + (list
So it basically just uses `regexp-opt' instead of making the regexp
itself "manually"? But the result is significantly slower, and the code
doesn't seem to be shorter?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
next prev parent reply other threads:[~2014-02-01 0:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-28 3:53 Daniel Dehennin
2014-02-01 0:17 ` Lars Ingebrigtsen [this message]
2014-02-01 13:07 ` Daniel Dehennin
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=877g9fit3r.fsf@building.gnus.org \
--to=larsi@gnus.org \
--cc=ding@gnus.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 NNTP newsgroup(s).