emacs-devel
[Top][All Lists]
Advanced

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

Re: funcall consing


From: LdBeth
Subject: Re: funcall consing
Date: Fri, 31 Dec 2021 23:09:56 +0800
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-apple-darwin18.7.0) MULE/6.0 (HANACHIRUSATO)

>>>>> In <83fsq9gdhw.fsf@gnu.org> 
>>>>>   Eli Zaretskii <eliz@gnu.org> wrote:

Tomas> (benchmark-run 10 (dotimes (i 100000) (1+ i)))
Tomas> ;;(2.720941123 40 1.7525918699999998)
Tomas> (let ((x (lambda (i) (1+ i)))) (benchmark-run 10 (dotimes (i 100000) 
(funcall x i))))
Tomas> ;;(4.9373091140000005 80 3.4835688719999958)

Eli> What do you mean by "consing" in this context, and what is your
Eli> evidence for "consing" in the above example?  Is that only the
Eli> performance degradation, or is that something else?

Tomas probably means this (from the docstring of benchmark-run):

Return a list of the total elapsed time for execution, the number of
garbage collections that ran, and the time taken by garbage collection.

> (4.9373091140000005 80 3.4835688719999958)

The `80' indicats the GC has been invoked 80 times. That is the direct
indication of "consing".

-- 
LDB



reply via email to

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