From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps. Date: Sun, 25 Nov 2018 17:59:29 +0000 Message-ID: <20181125175929.GE27152@ACM> References: <20181117124534.GA8831@ACM> <83muq7u9rk.fsf@gnu.org> <20181123130904.GA2916@ACM> <20181125143125.GA27152@ACM> <87y39h6vie.fsf@igel.home> <20181125154203.GB27152@ACM> <838t1hjejt.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1543168887 32212 195.159.176.226 (25 Nov 2018 18:01:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Nov 2018 18:01:27 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: cpitclaudel@gmail.com, charles@aurox.ch, michael_heerdegen@web.de, emacs-devel@gnu.org, schwab@linux-m68k.org, monnier@IRO.UMontreal.CA To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 25 19:01:22 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 1gQyif-0008Ey-0M for ged-emacs-devel@m.gmane.org; Sun, 25 Nov 2018 19:01:21 +0100 Original-Received: from localhost ([::1]:60750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQykl-0007su-KS for ged-emacs-devel@m.gmane.org; Sun, 25 Nov 2018 13:03:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQyk8-0007kS-38 for emacs-devel@gnu.org; Sun, 25 Nov 2018 13:02:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQyk4-0005zw-TE for emacs-devel@gnu.org; Sun, 25 Nov 2018 13:02:52 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:47656 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gQyk4-0005yq-MC for emacs-devel@gnu.org; Sun, 25 Nov 2018 13:02:48 -0500 Original-Received: (qmail 28001 invoked by uid 3782); 25 Nov 2018 18:02:46 -0000 Original-Received: from acm.muc.de (p2E5D5C08.dip0.t-ipconnect.de [46.93.92.8]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 25 Nov 2018 19:02:45 +0100 Original-Received: (qmail 27708 invoked by uid 1000); 25 Nov 2018 17:59:29 -0000 Content-Disposition: inline In-Reply-To: <838t1hjejt.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:231355 Archived-At: Hello, Eli. On Sun, Nov 25, 2018 at 18:40:54 +0200, Eli Zaretskii wrote: > > Date: Sun, 25 Nov 2018 15:42:03 +0000 > > Cc: "Charles A. Roelli" , michael_heerdegen@web.de, > > eliz@gnu.org, cpitclaudel@gmail.com, monnier@IRO.UMontreal.CA, > > emacs-devel@gnu.org > > From: Alan Mackenzie > > The idea behind symbols-with-pos-enabled is that it will be a 32/64 bit > > integer permanently in cache, hence can be tested for zero/non-zero > > rapidly. > This is premature optimization, we have gazillions of such tests in > our inner loops (e.g., see bidi.c), one more or one less shouldn't > matter. It's a straightforward way of writing it, without using any contorted code, so even if it is optimisation, it's harmless optimisation. But right from the beginning of the exercise, I've had speed at the back of my mind. If the slowdown had been 30%, the Emacs project leadership would have been very unhappy about the idea. My current trouble arises from the need to access the variable both from C and from Lisp. > > Even so, the mechanism has slowed Emacs down by seven or eight per cent. > I'd be very surprised if using a boolean Lisp variable would slow that > down more. I'm still a little confused as to what a DEFVAR_BOOL is. Is it a full Lisp_Object, of which only one bit is used, or is it one of many DEFVAR_BOOLs packed into a single word? -- Alan Mackenzie (Nuremberg, Germany).