From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Lisp_Marker size on 32bit systems Date: Fri, 07 Sep 2018 23:10:31 -0400 Message-ID: References: <5a2c709e-aa49-b5b6-3fbe-fb8bd33acb23@cs.ucla.edu> <06d01a4b-9d98-df5b-be8a-aeda449acad7@cs.ucla.edu> <0e358c21-1e67-32f9-d24b-fa039753a2de@cs.ucla.edu> <499c51c7-37c0-0b4f-442c-8f83f1574523@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536376124 472 195.159.176.226 (8 Sep 2018 03:08:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2018 03:08:44 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 08 05:08:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyTbz-0008Ss-Uz for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2018 05:08:40 +0200 Original-Received: from localhost ([::1]:41139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyTe6-0006fi-0q for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2018 23:10:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyTe0-0006fc-1l for emacs-devel@gnu.org; Fri, 07 Sep 2018 23:10:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyTdw-0006oe-U4 for emacs-devel@gnu.org; Fri, 07 Sep 2018 23:10:44 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:52602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyTdw-0006it-Op for emacs-devel@gnu.org; Fri, 07 Sep 2018 23:10:40 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w883AWeB023308; Fri, 7 Sep 2018 23:10:33 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 50A686610C; Fri, 7 Sep 2018 23:10:31 -0400 (EDT) In-Reply-To: <499c51c7-37c0-0b4f-442c-8f83f1574523@cs.ucla.edu> (Paul Eggert's message of "Fri, 7 Sep 2018 20:04:52 -0700") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6369=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6369> : inlines <6865> : streams <1797815> : uri <2705505> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:229469 Archived-At: >> Those perf-stats also show improved I$ performance, which isn't >> explained by your suggested explanation. Similarly, they show >> a reduced number of instructions. > > Yes, it could well be that the 32-byte allocation is faster than the 24 > partly due to some reason other than d-cache effects. Although there > is a smaller percentage of cache misses in the 32-byte version, it could be > that this is because the 32-byte version uses simpler code that would be > faster even if the cache miss rate were the same. That's my impression as well, but I'd be curious to know why that is. The only "obvious" advantage is that 32 is a power of 2 so you can use shift for multiplication/division, but that would only apply to things like indexing arrays of markers or computing the diff between two marker pointers. AFAIK we don't do any such operation. Stefan