From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Newsgroups: gmane.emacs.devel Subject: Re: In support of guile-emacs Date: Mon, 19 Oct 2015 20:50:16 +0200 Message-ID: <87wpuilml3.fsf@T420.taylan> References: <87fv17kgno.fsf@dustycloud.org> <20151019102414.GA2438@acm.fritz.box> <5624FADF.9070908@dancol.org> <20151019143527.GG2438@acm.fritz.box> <87eggqn6eo.fsf@T420.taylan> <20151019171909.GH2438@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445281006 15678 80.91.229.3 (19 Oct 2015 18:56:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 18:56:46 +0000 (UTC) Cc: Xue Fuqiao , Christopher Allan Webber , Daniel Colascione , bruce.connor.am@gmail.com, emacs-devel To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 20:56:41 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZoFbq-0006Hj-Gg for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 20:56:38 +0200 Original-Received: from localhost ([::1]:41670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoFbp-0004zB-TW for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 14:56:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoFVl-0000I9-Cd for emacs-devel@gnu.org; Mon, 19 Oct 2015 14:50:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoFVj-0007Tl-GQ for emacs-devel@gnu.org; Mon, 19 Oct 2015 14:50:21 -0400 Original-Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:35399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoFVj-0007TT-5e for emacs-devel@gnu.org; Mon, 19 Oct 2015 14:50:19 -0400 Original-Received: by lbbes7 with SMTP id es7so62418564lbb.2 for ; Mon, 19 Oct 2015 11:50:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=Po9nb5yDsn5MK7zZQzSCLAzWt15kzJ8wZ70TifRcrW0=; b=wVEDRa+gIX4KCjecBkFglaUbsL6UY/j34uE1n30A2YMLMNYnVbNYwXD+PW20lRLpCA mg3DKtf37wmAqvGmOmkb4U3s2Q0jR/jGVealhHdrvDlaxFG6zCJhKcPklxRqLXVMQA5O SbkDMeiDHzysPqecZMaVHmZxtCJ3MuERsfPBwsAl2jADeO4B3R93YdzF8nktNdVQQ/zP +DAkY7namKcwz1RmMYVAypuqOvliyVpg8VJxbcpzSGRxzcHlQPr7nlqZhG0E6002Fdzj drzbUt1Tw2NW9UO6Mvu/t/99diR1asNNnEOePZ1q7Eu6755BawxGL8letPdCm3AwdF9h ztPQ== X-Received: by 10.194.157.166 with SMTP id wn6mr35178557wjb.44.1445280618500; Mon, 19 Oct 2015 11:50:18 -0700 (PDT) Original-Received: from T420.taylan ([2a02:908:c32:4740:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id hs5sm16137684wib.6.2015.10.19.11.50.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 11:50:17 -0700 (PDT) In-Reply-To: <20151019171909.GH2438@acm.fritz.box> (Alan Mackenzie's message of "Mon, 19 Oct 2015 17:19:09 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192127 Archived-At: Alan Mackenzie writes: > Hello, Taylan. > > On Mon, Oct 19, 2015 at 06:56:47PM +0200, Taylan Ulrich Bay=C4=B1rl=C4=B1= /Kammer wrote: >> Alan Mackenzie writes: > >> > Hello, Daniel. > >> > On Mon, Oct 19, 2015 at 07:14:55AM -0700, Daniel Colascione wrote: >> >> On 10/19/2015 03:24 AM, Alan Mackenzie wrote: >> >> > Hello, Xue. > >> >> > On Mon, Oct 19, 2015 at 09:07:59AM +0800, Xue Fuqiao wrote: > >> >> >> guile-emacs replaces Emacs's own Emacs Lisp engine with Guile's (w= ithout >> >> >> breaking backward compatibility). So: > >> >> >> * Emacs Lisp will execute faster (Guile VM bytecode is more effici= ent) > >> >> > Just as a matter of interest, approximately how much faster is Guile >> >> > bytecode than Emacs bytecode? Are we talking about 10%, 20%, 50%, a >> >> > factor of 2, or even higher? > >> >> > If that speed increase was significant, it might be worth incorpora= ting >> >> > Guile's bytecode into Emacs just for that reason, regardless of any= of >> >> > the other stuff. > >> >> Or simply making completely independent and custom-tailored improveme= nts >> >> to the Emacs bytecode compiler and interpreter itself. There's no rea= son >> >> to imagine that the only way to improve performance there is to move = to >> >> a completely different runtime. > >> > Indeed not. Lessons could be learnt from Guile, perhaps. But how much >> > faster is Guile bytecode? > >> For the record, the unreleased Guile 2.2 uses a register VM (instead of >> a stack VM), and has a different intermediate language on which more >> optimization is done. There's prospect for native code compilation too >> for the future, from what I gather. So Guile's performance isn't >> exactly fixed at its current state, and improvements are happening at a >> pretty impressive rate. > > A true politician's (non-)answer. ;-) Politician? Don't insult me! :-P I actually did some silly looping tests, but decided not to post them. As far as the silly loops were concerned, there wasn't much difference. Elisp's dotimes counts to ten million slightly faster than Guile's 'do' with explicit counting (best approximation of 'dotimes' I could come up with). Guile iterates over a list of ten million elements faster. It didn't seem worthwhile to post; silly loops are just silly loops. (Incidentally, silly loops got faster in Guile 2.2![0] Apparently non-silly loops also got faster though.[1]) [0] http://wingolog.org/archives/2013/11/26/a-register-vm-for-guile [1] http://wingolog.org/archives/2015/07/28/loop-optimizations-in-guile And here some fun; when I tried to imitate dotimes with a "named let" loop instead of 'do': > ,time (let loop ((i 0)) (unless (=3D 10000000) (loop (+ i 1)))) ;; 0.002618s real time, 0.002607s run time. 0.000000s spent in GC. What?! That's way too fast. Oh wait... > ,optimize (let loop ((i 0)) (unless (=3D 10000000) (loop (+ i 1)))) $2 =3D (if #f #f) Oh, heh. A void 'do' loop doesn't get the same treatment because of slightly different semantics, but a void named-let loop simply gets eliminated out. > Is the Guile VM, in fact, faster than the Emacs byte interpreter? Who's > done any measurements? Surely the speed advantage/disadvantage of the > Guile VM will depend, possibly a lot, on what program is being tested, > but has anybody actually done any actual benchmarking? I would also like to know, really. I don't know what good benchmarks might be that are both realistic and show the benefits of Guile's added optimization passes and such. At the same time though, I'm really very hopeful about Guile's future wrt. performance. A very great hacker is working on it. Taylan