From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Compilation to native Date: 13 Apr 2004 13:32:37 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87d66bg55g.fsf-monnier+emacs@gnu.org> References: <87eks0654s.fsf@sno.mundell.ukfsn.org> <87n06bp4ng.fsf@sno.mundell.ukfsn.org> <877jxccutf.fsf@sno.mundell.ukfsn.org> <87k712gesk.fsf@sno.mundell.ukfsn.org> <87k70lhrsq.fsf@sno.mundell.ukfsn.org> <87wu4jrf3j.fsf@sno.mundell.ukfsn.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1081878023 27841 80.91.224.253 (13 Apr 2004 17:40:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Apr 2004 17:40:23 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 13 19:39:58 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BDRt7-0007ZM-00 for ; Tue, 13 Apr 2004 19:39:57 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BDRt7-0003WO-00 for ; Tue, 13 Apr 2004 19:39:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BDRqn-0003LE-FB for emacs-devel@quimby.gnus.org; Tue, 13 Apr 2004 13:37:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BDRpH-0002qa-IR for emacs-devel@gnu.org; Tue, 13 Apr 2004 13:35:59 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BDRm8-000229-Lo for emacs-devel@gnu.org; Tue, 13 Apr 2004 13:33:15 -0400 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BDRm7-00021p-W6; Tue, 13 Apr 2004 13:32:44 -0400 Original-Received: from alfajor ([67.71.32.91]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040413173237.JBZZ1581.tomts36-srv.bellnexxia.net@alfajor>; Tue, 13 Apr 2004 13:32:37 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id A1EC6D72D7; Tue, 13 Apr 2004 13:32:37 -0400 (EDT) Original-To: Matthew Mundell In-Reply-To: <87wu4jrf3j.fsf@sno.mundell.ukfsn.org> Original-Lines: 25 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21576 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21576 >> > This optimisation more than doubles the speed of the generated >> > function. The optimisation adds two new byte operations. As a start >> > the new operations always take parameters that are four bytes wide. I >> > think the loading of these four bytes is the cause of the slower byte >> > interpretation. >> I don't understand. Could you give us more info about what those new byte >> ops are and what they're used for (and maybe why you think they make things >> slower in the byte-interpreter, tho I should be able to figure that out on >> my own at that point). > The optimisation moves variable referencing and setting out of loops. Feel free to use precise words like `varref' or `varset'. We want/need technical details here. > The Lisp objects are instead referenced onto the stack before the > loop, and set from the stack afterwards. The new operations are used You mean you added two byteops: one to read the Nth word on the stack (counting from the top) and the other to set that word? I expect you called them something like `sset' and `sref'? Sounds generally useful (something similar is used in the `lexical' branch of Miles, you might want to check that out). Stefan