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: Thoughts on getting correct line numbers in the byte compiler's warning messages Date: Wed, 07 Nov 2018 12:11:03 -0500 Message-ID: References: <20181101175953.GC4504@ACM> <20181105105302.GA10520@ACM> <20181106151143.GB4030@ACM> <20181106191532.GC4030@ACM> <20181107123510.GA3966@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541610551 31507 195.159.176.226 (7 Nov 2018 17:09:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2018 17:09:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 07 18:09:07 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 1gKRKD-00082O-Rs for ged-emacs-devel@m.gmane.org; Wed, 07 Nov 2018 18:09:05 +0100 Original-Received: from localhost ([::1]:49431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKRMK-0003yg-06 for ged-emacs-devel@m.gmane.org; Wed, 07 Nov 2018 12:11:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKRMD-0003yO-2o for emacs-devel@gnu.org; Wed, 07 Nov 2018 12:11:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKRMA-0006PM-9p for emacs-devel@gnu.org; Wed, 07 Nov 2018 12:11:08 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:46145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKRMA-0006ON-4N for emacs-devel@gnu.org; Wed, 07 Nov 2018 12:11:06 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id wA7HB3TS023282; Wed, 7 Nov 2018 12:11:04 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A39E66A55C; Wed, 7 Nov 2018 12:11:03 -0500 (EST) In-Reply-To: <20181107123510.GA3966@ACM> (Alan Mackenzie's message of "Wed, 7 Nov 2018 12:35:10 +0000") 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, RV6413=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6413> : inlines <6957> : streams <1803591> : uri <2745807> 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:231050 Archived-At: > Looking at notes I made at the time, I amended a small portion of e.g. > byte-optimize-body to make a new hash entry with the same value when a > form was transformed. The slowdown on just the byte optimiser was > around a factor of three. Ouch! > I don't think I follow myself here. I was thinking that accessing a > hash table element was slow, therefore keeping a table value current and > pushing transformed forms onto it would be faster than creating a new > hash table entry for these new forms. Ah, so you'd keep a pointer to the list somehow and add to it by side-effects. Yes, I guess it would indeed be noticeably faster for the case of copying the location info from the source code to the transformed code. > Looking at the code for hash tables, the access time can not be all > that long. Hash-table accesses are pretty costly, in my experience. Stefan