bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66816: [PATCH] Delete redundant lambdas around unary functions


From: Mattias Engdegård
Subject: bug#66816: [PATCH] Delete redundant lambdas around unary functions
Date: Sun, 29 Oct 2023 20:03:16 +0100

> I've been able to measure around 10% better performance in the few cases
> I looked into.  Here's an example:
> 
>     (benchmark-run 1000
>       (seq-filter (lambda (n) (bufferp n))
>                   (number-sequence 0 100000)))

(This would be less of a problem if we could inline functions on the Lisp 
level...)

We could also have the compiler η-reduce automatically. I investigated this 
very briefly some time ago. Maybe I can dig up the patch.

One problem is that the arity isn't necessarily preserved. Most of the time 
this isn't a problem but it could be something to watch out for if doing the 
η-reduction by hand.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]