From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Why is Elisp slow? Date: Sat, 04 May 2019 23:15:15 -0400 Message-ID: References: <83muk4obfd.fsf@gnu.org> <20190502214006.4fdsinp7u5xuqvdv@Ergus> <20190503004416.xfuzzucflp6bxpuz@Ergus> <20190503103644.63lccjehmzulaojn@Ergus> <456EE4D4-F542-4F6A-B146-E6B9D72AE93B@icloud.com> <83tvebn1we.fsf@gnu.org> <20190503125832.44ovncaxp3vyjsla@Ergus> <20190504133218.g3ysx3ksuyvlthg3@Ergus> <86woj5u9k7.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="99571"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: =?utf-8?B?7KGw7ISx67mI?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 05 05:15:40 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hN7cp-000Pmy-S3 for geh-help-gnu-emacs@m.gmane.org; Sun, 05 May 2019 05:15:40 +0200 Original-Received: from localhost ([127.0.0.1]:35689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN7co-0001vm-Pz for geh-help-gnu-emacs@m.gmane.org; Sat, 04 May 2019 23:15:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN7cb-0001uH-IW for help-gnu-emacs@gnu.org; Sat, 04 May 2019 23:15:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hN7ca-0008Si-I3 for help-gnu-emacs@gnu.org; Sat, 04 May 2019 23:15:25 -0400 Original-Received: from mail01.iro.umontreal.ca ([132.204.25.201]:51126) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hN7ca-0008Rq-Bc for help-gnu-emacs@gnu.org; Sat, 04 May 2019 23:15:24 -0400 Original-Received: from mail01.iro.umontreal.ca (mail01.iro.umontreal.ca [127.0.0.1]) by mail01.iro.umontreal.ca (Postfix) with ESMTP id 731638891F85 for ; Sat, 4 May 2019 23:15:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; h=content-transfer-encoding:content-type:content-type :mime-version:user-agent:in-reply-to:date:date:references :message-id:subject:subject:to:from:from; s=dkim; t=1557026122; x=1557890123; bh=Tx4gLibA5lADyD+SxF12oxpV0RIV/WPpcul11oZH3QI=; b= WNazXr1m8oc65Qy4K0AL9VEQ/P++ycPnKGZY4+2c/ySZbKKEhPVLcZ3qrK47MNka YT6yX8QOQRe0991GjlhR8xV06nY7EEicumTrjSVt1UD6+CnNFHGhx4NwdE2nvZEQ 1UoOqE5c258+5yqywQldDvhbD+4bls3bfT8qQjuyycDNHXnM1hZuCO4BjCnksIua y54romYoALQ/eSj1Rr1+JU7Zm4Ez6+K9TjPUUnaradfrbaHW91iTBv/dyCrLyxn/ EudJWuoxwfNnR32/7DJChFL0A2fKs179YvzPka4uqABt2cHXznFFgB3Is08GLxoC ngp7uNIuke7JoE2H6aAnow== X-Virus-Scanned: amavisd-new at iro.umontreal.ca Original-Received: from mail01.iro.umontreal.ca ([127.0.0.1]) by mail01.iro.umontreal.ca (mail01.iro.umontreal.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6AUXb179kdUL for ; Sat, 4 May 2019 23:15:22 -0400 (EDT) Original-Received: from alfajor (unknown [167.88.22.101]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 568378891F70; Sat, 4 May 2019 23:15:22 -0400 (EDT) In-Reply-To: (=?utf-8?B?IuyhsOyEseu5iCIncw==?= message of "Sun, 5 May 2019 09:12:20 +0900") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.201 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120202 Archived-At: >>> Why can't Elisp be compiled as well? >> The question is meaningless because it's premise is wrong: Elisp can >> be compiled as well. > I=E2=80=99m pretty sure Elisp can=E2=80=99t compile down to raw machine c= ode (like JIT) in > current infrastructure. Maybe there is no compiler that does that currently, but that's not relevant to the question of whether there can be such a compiler. [ And FWIW, you can probably compile Elisp to "raw" machine code with https://sourceforge.net/p/clocc/hg/ci/default/tree/src/cllib/elisp.lisp ] > Elisp bytecode is terribly slow :-( There's been very little effort put into making it fast, indeed. This said, when we compared it to Guile and some byte-code-based Common-Lisp (I think it was ECL, but I can't remember) some years ago it wasn't nearly as bad as I thought. If someone's interested in speeding it up. I'd recommend two approaches: - Either a JIT based on something like basic-block-versioning (BBV) - Or a fast byte-code such as those generated by vmgen Stefan