From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wojciech Meyer Newsgroups: gmane.emacs.devel Subject: Re: Compiling Elisp to a native code with a GCC plugin Date: Tue, 14 Sep 2010 20:45:32 +0100 Message-ID: <874ods5ctf.fsf@gmail.com> References: <87bp805ecr.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1284493587 18302 80.91.229.12 (14 Sep 2010 19:46:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Sep 2010 19:46:27 +0000 (UTC) Cc: Wojciech Meyer , emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 14 21:46:23 2010 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.69) (envelope-from ) id 1OvbSP-0006WO-LZ for ged-emacs-devel@m.gmane.org; Tue, 14 Sep 2010 21:46:21 +0200 Original-Received: from localhost ([127.0.0.1]:33906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvbSP-0008RL-3F for ged-emacs-devel@m.gmane.org; Tue, 14 Sep 2010 15:46:21 -0400 Original-Received: from [140.186.70.92] (port=43650 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvbSI-0008RF-TT for emacs-devel@gnu.org; Tue, 14 Sep 2010 15:46:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvbSH-0002DZ-JO for emacs-devel@gnu.org; Tue, 14 Sep 2010 15:46:14 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:61172) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvbSH-0002DQ-Dy for emacs-devel@gnu.org; Tue, 14 Sep 2010 15:46:13 -0400 Original-Received: by wwb24 with SMTP id 24so8565178wwb.30 for ; Tue, 14 Sep 2010 12:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=+wWxoeqlCBkzcXUKEQ9m6PcpmLWJ6vu2rx9HPqfxnZ8=; b=r0MfH2RU82CzTrbO+eott0DyEPjiUKYWdb5lp9GxEnnACZ9lsD1qew8/MucorQyKFR QERSYtY5TEzQW8Ea0YmBKlj7SDDkyeqbfBOTW7eXDCOlcZXZb2InWBUWF8K05bWeEvkF 6k8PK2FZemkKHrThHMhCB2rIFQ+m+38UgXPcE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=Y2gXucM/LuyU38W4AWWAVMRiH7mFiDtxFOyi7W6tSdetLODu9ApSC041KDTXeWMyDh 7VkplndPrquvHybi+/2mrzer/SvVX/mNZM2MBqARI1UpzHSm3k9gxNQ4JbZXIfKDIsZv WokCSIzAnaxVG7S+++Qa8rLgGku4z/y5ldo5A= Original-Received: by 10.227.151.195 with SMTP id d3mr317512wbw.170.1284493571979; Tue, 14 Sep 2010 12:46:11 -0700 (PDT) Original-Received: from spec-desktop.specuu.com (host86-133-35-46.range86-133.btcentralplus.com [86.133.35.46]) by mx.google.com with ESMTPS id w31sm477955wbd.21.2010.09.14.12.46.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Sep 2010 12:46:11 -0700 (PDT) In-Reply-To: (Tom Tromey's message of "Tue, 14 Sep 2010 13:32:30 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:130147 Archived-At: Tom Tromey writes: > I think you can compile elisp without needing a plugin. Just convert > the bytecode to C, and compile that. This is actually quite easy. Yes, but you can't JIT it in memory, and that also builds dependency on a C compiler. > > However, it is not very likely to result in a performance improvement > right now. A similar idea was tried and did not work out: > > http://www.mundell.ukfsn.org/native/ > > I think this idea might be worth revisiting when lexbind is merged in, > emphasis on "might". E.g., it seems to me that this approach might work > ok for the recently-discussed range-map code. Well Elisp nature is dynamic, plus dynamic scoping makes it hard to compile, but somewhat C Lispy code *can* work faster. > > As I recall, in my profiles, the GC and the regexp matcher were more > costly the bytecode interpreter (though of course this is > workload-dependent). If you are interested in performance, I suggest > doing your own profiles and starting there. Mark and sweep is no good, it would be so good if we had generational GC... :( > > Tom Thanks, Wojciech