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: Mon, 13 Aug 2018 09:15:38 -0600 Message-ID: <87pnym47s5.fsf@tromey.com> References: <87va8ej4o1.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1534173342 14693 195.159.176.226 (13 Aug 2018 15:15:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Aug 2018 15:15:42 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) Cc: Tom Tromey , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 13 17:15:38 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 1fpEZE-0003hy-Ux for ged-emacs-devel@m.gmane.org; Mon, 13 Aug 2018 17:15:37 +0200 Original-Received: from localhost ([::1]:39994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpEbL-0008IG-CP for ged-emacs-devel@m.gmane.org; Mon, 13 Aug 2018 11:17:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpEaC-00086e-0j for emacs-devel@gnu.org; Mon, 13 Aug 2018 11:16:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpEa8-0007go-Pt for emacs-devel@gnu.org; Mon, 13 Aug 2018 11:16:35 -0400 Original-Received: from gateway36.websitewelcome.com ([192.185.186.5]:33430) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fpEa8-0007f1-G4 for emacs-devel@gnu.org; Mon, 13 Aug 2018 11:16:32 -0400 Original-Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway36.websitewelcome.com (Postfix) with ESMTP id C600940182700 for ; Mon, 13 Aug 2018 09:19:42 -0500 (CDT) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id pEZHfp3efbXuJpEZqfD7kU; Mon, 13 Aug 2018 10:16:31 -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=iMz3HUUf26t7KXtpHz1w9rmkLrqs2D3krR/eBAvwwis=; b=KElFQ4v8JVhGjjW+V+QYrKB3Ra eUKeA0xPOncOJOyxFLPZaE+qApdq+iw2EA3SRF8gOLQfq9ZqugNIS7Fq3WGzBpv2m6Ca9m0M+i8lV w14rzztx/NIK9AUXaRu/x4or+; Original-Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:42154 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fpEZH-001bNl-2r; Mon, 13 Aug 2018 10:15:39 -0500 X-Attribution: Tom In-Reply-To: (Paul Eggert's message of "Sun, 12 Aug 2018 22:37:25 -0700") 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: 1fpEZH-001bNl-2r X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-85-72.hlrn.qwest.net (pokyo) [75.166.85.72]:42154 X-Source-Auth: tom+tromey.com X-Email-Count: 2 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.186.5 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:228486 Archived-At: >>>>> "Paul" == Paul Eggert writes: Paul> When you say "doesn't work", does that mean Emacs can reliably tell Paul> the JIT won't work and fall back on the current bytecode Paul> implementation, or something else? What I meant is that when I wrote this, I didn't think about --with-wide-int, and so some of the calls into libjit are incorrect for that situation. It shouldn't be hard to fix. >> libjit never frees functions. So, if a function is JIT-compiled >> and then redefined, the old JIT code will linger. It's possible to fix >> this with a custom allocator and a libjit patch (that I sent but that >> hasn't been checked in yet). Paul> libjit has only one committer, Aleksey, and no commits since March. Is Paul> there a bottleneck there? He's reasonably responsive, but it's true that the lack of an active community around libjit is a bit of a risk. Mostly the problems would be either (1) missing ports or (2) lack of improvements; for example, libjit's register allocator is not very good, but nobody is working on improving it. It would be possible to switch to another JIT back end, but when I looked into the various ones that are available, libjit was both easy to use and reasonably lightweight (without being too lightweight, like GNU Lightning). But, for example, GCC has a JIT interface now. That could be used instead. That seemed pretty heavy-weight to me; but I didn't really try it in anger so maybe my fears are unfounded. Tom