From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: indirect threading for bytecode interpreter Date: Thu, 17 Sep 2009 15:06:46 -0600 Message-ID: References: Reply-To: Tom Tromey NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253221635 20956 80.91.229.12 (17 Sep 2009 21:07:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Sep 2009 21:07:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 17 23:07:08 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MoOBy-0001fw-20 for ged-emacs-devel@m.gmane.org; Thu, 17 Sep 2009 23:07:02 +0200 Original-Received: from localhost ([127.0.0.1]:33428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoOBx-0006oF-G5 for ged-emacs-devel@m.gmane.org; Thu, 17 Sep 2009 17:07:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoOBs-0006mA-QB for emacs-devel@gnu.org; Thu, 17 Sep 2009 17:06:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoOBn-0006fH-NH for emacs-devel@gnu.org; Thu, 17 Sep 2009 17:06:56 -0400 Original-Received: from [199.232.76.173] (port=46719 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoOBn-0006f4-Fv for emacs-devel@gnu.org; Thu, 17 Sep 2009 17:06:51 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:1260) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MoOBm-0004B0-OH for emacs-devel@gnu.org; Thu, 17 Sep 2009 17:06:51 -0400 Original-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8HL6nEq011243; Thu, 17 Sep 2009 17:06:49 -0400 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8HL6mla021708; Thu, 17 Sep 2009 17:06:48 -0400 Original-Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n8HL6lf0005759; Thu, 17 Sep 2009 17:06:47 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id AAD65378204; Thu, 17 Sep 2009 15:06:46 -0600 (MDT) X-Attribution: Tom In-Reply-To: (Helmut Eller's message of "Thu, 17 Sep 2009 22:41:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115436 Archived-At: >>>>> "Helmut" == Helmut Eller writes: Helmut> 5% doesn't sound like a lot to some people. Shrug. Obviously I think the tradeoff is worth it, or I would not have sent the patch. I don't think the result is all that ugly. And, importantly, it is very low-hanging fruit. Helmut> vmgen sounds like a good idea, but I fear that it makes the build Helmut> process quite a bit more complicated. You can check in the generated code. vmgen is a nice idea. I rejected writing this as a direct-threaded interpreter because I assumed that the added memory use would be a bad tradeoff. But, if you are interested in that, perhaps I could take a stab at it. Helmut> I'm wondering why gcc can't perform this transformation from the Helmut> switch based code. Is there no compiler setting to skip the Helmut> range check in the switch statement? It isn't about range checking but about eliminating a jump during the dispatch. GCC could be taught to do this. I imagine that it has always been simpler for people to just update their interpreter than it has been to try to fix GCC. I don't think that some possible future GCC change should affect whether this patch goes in. Tom