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: Wed, 21 Oct 2015 14:54:15 +0200 Message-ID: <878u6wfklk.fsf@T420.taylan> References: <20151019102414.GA2438@acm.fritz.box> <5624FADF.9070908@dancol.org> <20151019143527.GG2438@acm.fritz.box> <87eggqn6eo.fsf@T420.taylan> <20151019171909.GH2438@acm.fritz.box> <87wpuilml3.fsf@T420.taylan> <20151019201224.GJ2438@acm.fritz.box> <87h9lmlgim.fsf@T420.taylan> <20151020095332.GA1781@acm.fritz.box> <87bnbtgv3p.fsf@T420.taylan> 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 1445432117 31794 80.91.229.3 (21 Oct 2015 12:55:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Oct 2015 12:55:17 +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 Wed Oct 21 14:55:03 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 1Zosuo-0002ON-9w for ged-emacs-devel@m.gmane.org; Wed, 21 Oct 2015 14:54:50 +0200 Original-Received: from localhost ([::1]:51376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zosun-0003cC-ID for ged-emacs-devel@m.gmane.org; Wed, 21 Oct 2015 08:54:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZosuK-0003A0-QU for emacs-devel@gnu.org; Wed, 21 Oct 2015 08:54:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZosuJ-00006U-Lj for emacs-devel@gnu.org; Wed, 21 Oct 2015 08:54:20 -0400 Original-Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:35114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZosuJ-00006J-Fl for emacs-devel@gnu.org; Wed, 21 Oct 2015 08:54:19 -0400 Original-Received: by wicll6 with SMTP id ll6so89575105wic.0 for ; Wed, 21 Oct 2015 05:54: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=2vpupw81MlQE9ZP7h/2VjQhoBUhg4BpRtMct61HQ8NQ=; b=Abld9khcmWPztpfkjuuVLdIkNSrPswgu8sOUssq6niPT/YKt85pBjjlXhatIom6oKf toSOLslCtXZ5qe6IkFiXbImmZwD/kkCdKJa2B/A+we9JOk107z1APvu7utiJEPyguAx6 0XsOdsNt8VeuR5hVIOvOXE3qrHnNUZCQf59KK7hV4h9mSFIjOOGmzbC/X4Zsz8mxNoCK PPPmRgEHrdElW9mNTgy435DwO4OdPqzIZNnwYrpeGFrxf2D1wKuI4OPzcwvfgKPJj0s5 Wj+1L/1c1Ln//dhNJ4YhrbYK641ueSrao6Kjhq43sPScukTHA4Njgc/RzHbdVtDzBPAG zw0w== X-Received: by 10.194.133.129 with SMTP id pc1mr10775226wjb.148.1445432058369; Wed, 21 Oct 2015 05:54:18 -0700 (PDT) Original-Received: from T420.taylan ([2a02:908:c32:4740:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id fr10sm23662976wib.14.2015.10.21.05.54.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 05:54:16 -0700 (PDT) In-Reply-To: <87bnbtgv3p.fsf@T420.taylan> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Tue, 20 Oct 2015 22:09:46 +0200") 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:400c:c05::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:192276 Archived-At: taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") writes: > Alan Mackenzie writes: > >> [...] >> >>> (let loop ((i 0) (s 0)) >>> (if (<=3D i 10000000) >>> (loop (+ i 1) (+ s i)) >>> (format #t "~s" s))) >> >>> Takes about 0.50s. >> >> So, we're talking about a speed up of around 13%/25% on a simple loop >> test, depending on whether or not an idiomatic Scheme formulation is >> used. Given that Guile compiled elisp wouldn't be optimised in this way, >> it would guess that the 13% is nearer the mark. But it would take a few >> real life tests to measure this better. > > Indeed, I don't think any conclusions should be drawn from this. While we still shouldn't draw any conclusions, I've repeated the test with master branch Guile now, since it's apparently packaged for Guile (as "guile-next") and thus trivial to install... The idiomatic Scheme version: (let loop ((i 0) (s 0)) (if (<=3D i 10000000) (loop (+ i 1) (+ s i)) (format #t "~s" s))) ~0.27s The Elisp-transcribed-to-Guile version: (let ((i 0) (s 0)) (while (<=3D i 10000000) (set! s (+ s i)) (set! i (1+ i))) (format #t "~s" s)) ~0.36s So the idiomatic version provides a ~2.3x speedup, and the literal transcription ~1.7x. I'm not sure what exact percent notation you used, but if it's (x - y) / y * 100 for original time x and new time y, then these are 130% and 70% which sounds pretty great! I'd also like to point out that this means the switch from Guile 2.0 to 2.2 (master) entails a 50% speedup of the Elisp-transcribed version (and a 85% speedup of the idiomatic Scheme version). This is *still* a silly loop test, but nevertheless, those are impressive numbers, which I think gives me a bit of defensibility in what I had said optimistically with regard to Guile performance having a bright future. :-) Taylan