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: 22 Mar 2004 16:37:04 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87eks0654s.fsf@sno.mundell.ukfsn.org> <87n06bp4ng.fsf@sno.mundell.ukfsn.org> <8765cwkejr.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1079994186 10067 80.91.224.253 (22 Mar 2004 22:23:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Mar 2004 22:23:06 +0000 (UTC) Cc: Matthew Mundell , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Mar 22 23:22:59 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 1B5Xox-0000j6-00 for ; Mon, 22 Mar 2004 23:22:59 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B5Xox-0001zN-00 for ; Mon, 22 Mar 2004 23:22:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B5XZL-0003F3-Pm for emacs-devel@quimby.gnus.org; Mon, 22 Mar 2004 17:06:51 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B5XVX-0002QU-La for emacs-devel@gnu.org; Mon, 22 Mar 2004 17:02:55 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B5XUz-000286-61 for emacs-devel@gnu.org; Mon, 22 Mar 2004 17:02:52 -0500 Original-Received: from [206.47.199.141] (helo=simmts12-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B5XUy-00027W-M0 for emacs-devel@gnu.org; Mon, 22 Mar 2004 17:02:20 -0500 Original-Received: from empanada.local ([67.68.216.177]) by simmts12-srv.bellnexxia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040322213704.FKSI4479.simmts12-srv.bellnexxia.net@empanada.local>; Mon, 22 Mar 2004 16:37:04 -0500 Original-Received: by empanada.local (Postfix, from userid 502) id 6EB0D13F4B5; Mon, 22 Mar 2004 16:37:04 -0500 (EST) Original-To: Juri Linkov In-Reply-To: <8765cwkejr.fsf@mail.jurta.org> Original-Lines: 23 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:20746 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20746 >> I don't think that a speedup of less than a factor of 2 would be worth >> installing something that might take substantial maintenance effort. > Hmm, I expected more speedup given that it compiles to machine code. Maybe Richard is right, but I wouldn't be surprised if we can't go much faster than that. A lot of time is spent in C primitives including binding variables and looking them up. Also a lot of the time spent in function call is cleverly spread and duplicated between the caller and the callee which are at two different places, so there's a lot of opportunities for optimization but it's very difficult to do it at all, let alone do it automatically. > Anyhow, while jit compilation of Emacs bytecode to native code would > be a far-reaching goal, the most urgent issue is with CCL programs. > Currently, CCL programs are unbearable slow. For example, opening > a 10MB UTF-8 file on a fast machine takes 5 min, while opening it > without conversion is performed instantly. And compiling CCL to native code is likely to bring much more impressive speed ups because less time is spent in C primitives. Stefan