From: Lars Ingebrigtsen <larsi@gnus.org>
To: Sam Steingold <sds@gnu.org>
Cc: 36697@debbugs.gnu.org
Subject: bug#36697: 27.0.50; gnus: some articles with score 0 are killed
Date: Mon, 27 Jul 2020 23:45:06 +0200 [thread overview]
Message-ID: <87eeow63a5.fsf@gnus.org> (raw)
In-Reply-To: <m18sf8n4ib.fsf@gnu.org> (Sam Steingold's message of "Fri, 24 Jul 2020 14:37:32 -0400")
Sam Steingold <sds@gnu.org> writes:
> So what's the verdict?
> Fix the code or modify my regexp and document the "feature"?
I think is documented... Yup:
@item Negated character classes
If you say stuff like @code{[^abcd]*}, you may get unexpected results.
That will match newlines, which might lead to, well, The Unknown. Say
@code{[^abcd\n]*} instead.
But that doesn't mean we couldn't change it now.
>> It's just very, very old code, trying to be maximally fast.
>
> you wrote it over 20 years ago, right?
> time flies...
Almost 30 years ago, and I didn't write it -- it was Per Abrahamsen.
:-) I would never have come up with such a great hack.
> I have no idea - but a general "code modernization", including a switch
> to lexical bindings and using return values instead of global variables
> to pass information around - would probably speed up the code.
> (and make it thread safe!)
I don't think there's any global variables used, but there's a lot of
variables with dynamic extent used to speed up scoring; yes.
That's still faster than using parameters, as far as I know.
I'm all for rewriting this... unless it makes Gnus significantly
slower. Usability takes precedence over code prettiness. But computers
have gotten slightly faster the last 30 years.
So if this can be rewritten to be backwards-compatible (and fast), but
not have the negated character class quirk, that'd be nice. I think
when Per wrote this stuff, the re-search approach was like a 10x speedup
over the loop-and-string-match approach.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2020-07-27 21:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 20:51 bug#36697: 27.0.50; gnus: some articles with score 0 are killed Sam Steingold
2019-09-23 23:15 ` Lars Ingebrigtsen
2019-09-23 23:39 ` Sam Steingold
2019-09-24 7:34 ` Lars Ingebrigtsen
2019-09-24 18:24 ` Sam Steingold
2019-09-25 13:07 ` Lars Ingebrigtsen
2020-01-08 17:13 ` Sam Steingold
2020-01-08 17:19 ` Sam Steingold
2020-01-15 16:09 ` Sam Steingold
2020-01-22 12:53 ` Lars Ingebrigtsen
2020-07-19 15:40 ` Lars Ingebrigtsen
2020-07-20 23:11 ` Sam Steingold
2020-07-23 13:56 ` Lars Ingebrigtsen
2020-07-23 20:04 ` Sam Steingold
2020-07-24 15:27 ` Lars Ingebrigtsen
2020-07-24 18:37 ` Sam Steingold
2020-07-27 21:45 ` Lars Ingebrigtsen [this message]
2022-04-17 18:08 ` Lars Ingebrigtsen
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/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeow63a5.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=36697@debbugs.gnu.org \
--cc=sds@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).