emacs-devel
[Top][All Lists]
Advanced

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

Re: What's missing in ELisp that makes people want to use cl-lib?


From: João Távora
Subject: Re: What's missing in ELisp that makes people want to use cl-lib?
Date: Tue, 14 Nov 2023 02:44:58 +0000


On Tue, Nov 14, 2023 at 2:27 AM João Távora <joaotavora@gmail.com> wrote:


The case in the CL world against generic functions' performance 
is often not that the dispatch is slow, but that
 

That said, it still matters, of course.  Here's your non-destructive 
seq-difference-3 but with many small lists:

(setq cc (make-list 12 "blabla"))
(setq list2 (make-list 12 "shooveedoowaa"))

;; (4.225398191 31 2.3103362619999928)
(benchmark-run 1000000 (cl-set-difference cc list2 :test #'equal))

;; (6.959332908 56 4.235225837999991)
(benchmark-run 1000000 (seq-difference-3 cc list2))

And of course the destructive version still wins by 10x

;; (0.676608019 4 0.26997238299998116)
(benchmark-run 1000000 (cl-nset-difference cc list2 :test #'equal))

João

reply via email to

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