From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: funcall consing Date: Sat, 01 Jan 2022 09:28:02 +0200 Message-ID: <83o84vgbjx.fsf@gnu.org> References: <87ee5tm422.fsf@logand.com> <83fsq9gdhw.fsf@gnu.org> <8335m8hazn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-7 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16552"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tom@logand.com, emacs-devel@gnu.org To: LdBeth Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 01 08:28:53 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n3You-00044G-Me for ged-emacs-devel@m.gmane-mx.org; Sat, 01 Jan 2022 08:28:52 +0100 Original-Received: from localhost ([::1]:46746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3Yot-0003Z3-EL for ged-emacs-devel@m.gmane-mx.org; Sat, 01 Jan 2022 02:28:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3Yo7-0002hI-U0 for emacs-devel@gnu.org; Sat, 01 Jan 2022 02:28:03 -0500 Original-Received: from [2001:470:142:3::e] (port=54266 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3Yo7-00012J-KZ; Sat, 01 Jan 2022 02:28:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=m+A+O9M239xES6db5L0RNZGbmLs6X8nYEiEKcGlJ/Vo=; b=YG4C1bQCsDayw9W/a9b6 FzBZbhY4KNxu/izTdmRke66TC3G9QeGet5TrGBNP7yX7yYpIUaHyIgwEEG8GXwva2GZ232OPTKseR 3ro03xUp1eo4wdB2A8gyW1ZZxd3clSknw8Me9mRzY9MIiWSCcnPGG5IjEX1kzw4cqZsWUm61XXZBr 8H2FhDUL5N81usdGvQm/kuvG70++oCc/jIhuTHr05f7J2lcmbpO1/8I5VgVGSlln7adAsOjKCK4Fu 4B3CgNsLa5qiND/owqQujdFmBYnysr9Umw3F2Fs52ObMxJ8AQ+4BHRLGsz2+E4lluC6jSJAzQqr1P 1yTKk2jcy+2h/Q==; Original-Received: from [87.69.77.57] (port=2291 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3Yo7-0007zw-Fo; Sat, 01 Jan 2022 02:28:03 -0500 In-Reply-To: (message from LdBeth on Sat, 01 Jan 2022 12:51:53 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:283786 Archived-At: > Date: Sat, 01 Jan 2022 12:51:53 +0800 > From: LdBeth > Cc: LdBeth , > tom@logand.com, > emacs-devel@gnu.org > > Eli> Why are you saying that the number of times GC has been invoked is the > Eli> direct indication of consing? I don't think it is. Emacs doesn't > Eli> call GC because it knows how much consing was done, it calls GC in > Eli> certain strategic points in the interpreter, when the Lisp program > Eli> happens to hit those points. And funcall is indeed one of those > Eli> points. > > The docstring of `gc-cons-threshold' says: > > | Number of bytes of consing between garbage collections. > | Garbage collection can happen automatically once this many bytes have been > | allocated since the last garbage collection. All data types count. > | > | Garbage collection happens automatically only when ¡eval¢ is called. > > ``GC checkpoints'' are not equivlent to the actually invocation of GC > that would increase `gcs-done' (that is the variable been used by > `benchmark-run' to calculate the gc numbers). Otherwise, either this > docstring is untrue or the snippet below would always print different > numbers. See my other message about the details: you are reading too much into the doc string.