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

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

RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'


From: Drew Adams
Subject: RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Wed, 28 Dec 2022 21:24:07 +0000

> Michael, what is the fastest way to add element on stack of the list
> elements?
> 
> Let us say I am adding only strings, would this be faster than `push':
> 
> (setq my-list '())
> (setq my-list (cons (quote "Word") my-list))


I'm not Michael, but (push "Word" my-list) expands
to just that code.  So no, neither is faster.

(macroexpand-1 '(push "Word" mylist))

;; ==> (setq mylist (cons "Word" mylist))

(And no reason to quote either () or a literal string.)

reply via email to

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