From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Emacs Lisp JIT Compiler Date: Wed, 15 Aug 2018 18:29:37 -0600 Message-ID: <87bma3i26m.fsf@tromey.com> References: <87va8ej4o1.fsf@tromey.com> <87mutpiyz6.fsf@tromey.com> <701cd05f423e0c46595a3010f45414d0.squirrel@dancol.org> <520f536b5a603831c9a57a5f6f0978a2.squirrel@dancol.org> <83va8binu8.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1534379340 10254 195.159.176.226 (16 Aug 2018 00:29:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 16 Aug 2018 00:29:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) Cc: emacs-devel@gnu.org, Paul Eggert , dancol@dancol.org, tom@tromey.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 16 02:28:55 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fq69m-0002Zp-MP for ged-emacs-devel@m.gmane.org; Thu, 16 Aug 2018 02:28:54 +0200 Original-Received: from localhost ([::1]:52827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fq6Bt-0005WH-9y for ged-emacs-devel@m.gmane.org; Wed, 15 Aug 2018 20:31:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fq6B9-0005Vs-B0 for emacs-devel@gnu.org; Wed, 15 Aug 2018 20:30:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fq6B6-0007My-05 for emacs-devel@gnu.org; Wed, 15 Aug 2018 20:30:19 -0400 Original-Received: from gateway36.websitewelcome.com ([192.185.184.18]:43908) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fq6B5-0007MX-MQ for emacs-devel@gnu.org; Wed, 15 Aug 2018 20:30:15 -0400 Original-Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 14250400FD79E for ; Wed, 15 Aug 2018 18:33:34 -0500 (CDT) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id q6AVfFap4bXuJq6AqfdGPt; Wed, 15 Aug 2018 19:30:14 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GTlgo9Co1oZ5W36ZSbiTZYCd+PzbM64BsoQ4q9FQALg=; b=dMNGMp9AehIDPhH3mzSbgsikdw C00kR7vjfGcDS8OmPznze5ap8udLNE5RxWlEqelST8C100W77KrXIgsK74tWx2Zof5hSt1uXLq1i8 fHoQI3b8vPclH8Wn0H7bIhTul; Original-Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:39596 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fq6AU-002Hsk-UL; Wed, 15 Aug 2018 19:29:39 -0500 X-Attribution: Tom In-Reply-To: <83va8binu8.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Aug 2018 19:41:51 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.85.72 X-Source-L: No X-Exim-ID: 1fq6AU-002Hsk-UL X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-85-72.hlrn.qwest.net (bapiya) [75.166.85.72]:39596 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.184.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:228577 Archived-At: Paul> Are you're saying you'd rather have predictably bad performance, than Paul> have an application that sometimes has the bad performance in some Paul> situations, and 3x better performance in other situations? I am not sure I agree with this logic; to me it sounds like a sort of reductio ad absurdum of what Daniel said. But what he said makes sense, and it's an issue with the JIT idea. That said I don't think it is a very important issue, I think primarily because interested users can port the JIT as needed. Eli> I agree with Daniel here: having vastly different performance due to Eli> factors more or less out of end-user's control is bad for UX. Eli> That doesn't mean we want to have predictably bad performance, but it Eli> does mean that we should choose our JIT library so that it doesn't Eli> suffer from such issues. There is no JIT library that supports everything. GCC targets everything but I think (based on looking through bugzilla) doesn't support all hosts; and also as Daniel points out, requires binutils at runtime. libjit has been ported to some targets but not all (for example, it wouldn't support the Lemote Yeeloong that RMS used to use, since it has a MIPS chip). So, if this is the idea, then I fear Emacs will never have a JIT. Now, one thing that is portable is compiling Emacs Lisp code to C. For example, it would be easy to compile all the bytecode that is dumped into Emacs. The drawback is that this is just a fraction of what users use; and would probably not show major benefits. But, maybe it would help some. And, it would certainly allow some existing C code (looking at you, widget-put) to be moved to Lisp, which seems worthwhile to me. Tom