GNU bug report logs - #69108
false-positive warning "variable ‘_’ not left unused" in if-let* and if-let

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Tue, 13 Feb 2024 21:22:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 69108 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, Eli Zaretskii <eliz <at> gnu.org>,
 69108 <at> debbugs.gnu.org
Subject: Re: bug#69108: false-positive warning "variable ‘_’ not left unused" in if-let* and if-let
Date: Sat, 17 Feb 2024 11:45:30 +0000
Konstantin Kharlamov <Hi-Angel <at> yandex.ru> writes:

> Just a side note, from my experience pcase is very slow¹, so if a
> function supposed to be called often, I presume it's better to avoid
> `pcase`. Although, Idk how it compares to `cond`. But judging from the
> fact `cond` is implemented in C, it is likely faster.
>
> 1:
> https://github.com/ankurdave/color-identifiers-mode/commit/bc566bcdbd79f230b35eafd2b6c4f8428402ec09

I very much doubt the assertion of that commit.
AFAIK, pcase expands to a similar consp check. If may be slow only when
you macro-expand it during run time, not byte-compiling the code during
benchmark. I recommend `benchmark-run-compiled' for testing. Or even to
use native-compilation.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 1 year and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.