From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Tooltips GC overhead Date: Mon, 10 Aug 2015 19:44:23 +0200 Message-ID: <87h9o7f37s.fsf@fencepost.gnu.org> References: <55B7796B.3070005@gmx.at> <55B87E3F.80708@gmx.at> <55B8E367.9020201@cs.ucla.edu> <55B8F3E9.5000707@gmx.at> <833806yld0.fsf@gnu.org> <55B915CE.7070803@gmx.at> <55B94267.5050208@cs.ucla.edu> <55BCA454.6050208@gmx.at> <83egjkv2st.fsf@gnu.org> <83twsfu6b5.fsf@gnu.org> <87io8plwx9.fsf@esperi.org.uk> <8737ztiwrx.fsf@fencepost.gnu.org> <8737zrt6pv.fsf@esperi.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439228689 9974 80.91.229.3 (10 Aug 2015 17:44:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Aug 2015 17:44:49 +0000 (UTC) Cc: rudalics@gmx.at, Eli Zaretskii , eggert@cs.ucla.edu, Stefan Monnier , emacs-devel@gnu.org To: Nix Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 10 19:44:46 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZOr7u-0006AC-Ax for ged-emacs-devel@m.gmane.org; Mon, 10 Aug 2015 19:44:46 +0200 Original-Received: from localhost ([::1]:59604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOr7t-0001na-Ox for ged-emacs-devel@m.gmane.org; Mon, 10 Aug 2015 13:44:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOr7q-0001nV-U2 for emacs-devel@gnu.org; Mon, 10 Aug 2015 13:44:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOr7q-0006EL-0E for emacs-devel@gnu.org; Mon, 10 Aug 2015 13:44:42 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOr7Y-0006Az-L6; Mon, 10 Aug 2015 13:44:24 -0400 Original-Received: from localhost ([127.0.0.1]:40212 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZOr7X-0007lY-Lm; Mon, 10 Aug 2015 13:44:24 -0400 Original-Received: by lola (Postfix, from userid 1000) id 056FDDF35F; Mon, 10 Aug 2015 19:44:23 +0200 (CEST) In-Reply-To: <8737zrt6pv.fsf@esperi.org.uk> (nix@esperi.org.uk's message of "Mon, 10 Aug 2015 18:05:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188696 Archived-At: Nix writes: > On 8 Aug 2015, David Kastrup uttered the following: > >> Stefan Monnier writes: >> >>>> The cost you're trying to defend against here is a mispredicted branch >>> >>> No, I assume the branch would be properly predicted since it would >>> always take the same path. >> >> If cons is encountered with high frequency. But of course, if it is >> not, why bother in the first place? > > In that case I have no idea what you're trying to defend against. The > cost of a single conditional and predicted branch is drowned in the > overhead of the allocation that cons has to do anyway. Cons cells are pooled, so in a long session the consolidated cost is that of getting from the free list (cheap) and sweeping back into it once a mark phase no longer visits the cell. Which would be the rule rather than the exception for high-frequency consing. > I'd be astonished if you could ever see any performance impact > whatsoever. Cons cells for Lisp should end up quite cheaper than arbitrary-size allocations. -- David Kastrup