From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matthew Mundell Newsgroups: gmane.emacs.devel Subject: Re: Compilation to native Date: 02 Apr 2004 17:38:39 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <8765ciz65s.fsf@sno.mundell.ukfsn.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> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080924402 12639 80.91.224.253 (2 Apr 2004 16:46:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Apr 2004 16:46:42 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 02 18:46:32 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 1B9RoN-0002t9-00 for ; Fri, 02 Apr 2004 18:46:31 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B9RoN-0000w5-00 for ; Fri, 02 Apr 2004 18:46:31 +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 1B9Rm1-0002ZE-Pf for emacs-devel@quimby.gnus.org; Fri, 02 Apr 2004 11:44:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B9RlK-0002YR-O3 for emacs-devel@gnu.org; Fri, 02 Apr 2004 11:43:22 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B9Rko-0002SA-NI for emacs-devel@gnu.org; Fri, 02 Apr 2004 11:43:21 -0500 Original-Received: from [217.158.120.143] (helo=mail.ukfsn.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B9Rgw-0001e9-Tl; Fri, 02 Apr 2004 11:38:51 -0500 Original-Received: from localhost (lucy.ukfsn.org [127.0.0.1]) by mail.ukfsn.org (Postfix) with ESMTP id 1ABCEE6D65; Fri, 2 Apr 2004 17:37:13 +0100 (BST) Original-Received: from mail.ukfsn.org ([127.0.0.1]) by localhost (lucy.ukfsn.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16807-02; Fri, 2 Apr 2004 17:37:12 +0100 (BST) Original-Received: from sno.mundell.ukfsn.org (dsl213-218-238-16.as15444.net [213.218.238.16]) by mail.ukfsn.org (Postfix) with ESMTP id B4D4EE6D5A; Fri, 2 Apr 2004 17:37:12 +0100 (BST) Original-Received: from sno.mundell.ukfsn.org ([10.0.0.3]) by sno.mundell.ukfsn.org with esmtp (Exim 3.36 #1 (Debian)) id 1B9Rgm-0000JA-00; Fri, 02 Apr 2004 17:38:40 +0100 Original-To: rms@gnu.org Original-Lines: 31 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:21203 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21203 Richard Stallman writes: > There is the possibility of further improvement, especially for this > example, by moving Lisp object referencing and setting out of loops. > This will surely be tricky, though, if only because the functions > called by the byte code operations could change these objects. > > Maybe optimize the bytecode instead. This seems to be very much like the second item on the byte-opt.el TO DO list. The item is as follows. ;; maintain a list of functions known not to access any global variables ;; (actually, give them a 'dynamically-safe property) and then ;; (let ( v1 v2 ... vM vN ) <...dynamically-safe...> ) ==> ;; (let ( v1 v2 ... vM ) vN <...dynamically-safe...> ) ;; by recursing on this, we might be able to eliminate the entire let. ;; However certain variables should never have their bindings optimized ;; away, because they affect everything. ;; (put 'debug-on-error 'binding-is-magic t) ;; (put 'debug-on-abort 'binding-is-magic t) ;; (put 'debug-on-next-call 'binding-is-magic t) ;; (put 'inhibit-quit 'binding-is-magic t) ;; (put 'quit-flag 'binding-is-magic t) ;; (put 't 'binding-is-magic t) ;; (put 'nil 'binding-is-magic t) ;; possibly also ;; (put 'gc-cons-threshold 'binding-is-magic t) ;; (put 'track-mouse 'binding-is-magic t) ;; others?