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: Emanuel Berg
Subject: Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Thu, 29 Dec 2022 11:04:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Jean Louis wrote:

>> Read benchmark's doc string carefully :-)
>
> My misunderstanding is with FORM and BODY, when I read FORM,
> I understand it is same as BODY. Now I see the difference.
>
> I have found reference in Emacs Lisp manual, but I cannot
> find reference that FORM as argument means quoted sexp

Yeah, I've seen this mistake many times ...

If it says it is a function the args are eval'd, if it is
a macro they aren't.

C-h f benchmark RET

  `benchmark' is an autoloaded interactive native-compiled
  Lisp function

A bit further down it says also says

  For non-interactive use see also `benchmark-run'

C-h f benchmark-run RET

  `benchmark-run' is an autoloaded Lisp macro

Compare

(let ((cnt 0))
  (benchmark 5 (cl-incf cnt))
  cnt) ; 1

(let ((cnt 0))
  (benchmark-run 5 (cl-incf cnt))
  cnt) ; 5

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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