From: Alan Mackenzie <acm@muc.de>
To: "Taylan Ulrich Bayırlı/Kammer" <taylanbayirli@gmail.com>
Cc: Xue Fuqiao <xfq.free@gmail.com>,
Christopher Allan Webber <cwebber@dustycloud.org>,
Daniel Colascione <dancol@dancol.org>,
bruce.connor.am@gmail.com, emacs-devel <emacs-devel@gnu.org>
Subject: Re: In support of guile-emacs
Date: Wed, 21 Oct 2015 13:13:53 +0000 [thread overview]
Message-ID: <20151021131353.GD2608@acm.fritz.box> (raw)
In-Reply-To: <878u6wfklk.fsf@T420.taylan>
Hello, Taylan.
On Wed, Oct 21, 2015 at 02:54:15PM +0200, Taylan Ulrich Bayırlı/Kammer wrote:
> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
> > Alan Mackenzie <acm@muc.de> writes:
> >> [...]
> >>> (let loop ((i 0) (s 0))
> >>> (if (<= 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 (<= 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 (<= 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 think I used ((slow time) / (fast time) - 1) * 100, which is probably
an equivalent formula. But, what the heck?
I'm impressed. A factor of 2.3, or 1.7 speedup in elisp would be very
worthwhile, IMAO.
> 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. :-)
Go for it!
> Taylan
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2015-10-21 13:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-18 20:48 In support of guile-emacs Christopher Allan Webber
2015-10-18 23:12 ` Artur Malabarba
2015-10-19 1:07 ` Xue Fuqiao
2015-10-19 10:24 ` Alan Mackenzie
2015-10-19 10:27 ` David Kastrup
2015-10-19 14:14 ` Daniel Colascione
2015-10-19 14:35 ` Alan Mackenzie
2015-10-19 16:56 ` Taylan Ulrich Bayırlı/Kammer
2015-10-19 17:19 ` Alan Mackenzie
2015-10-19 18:50 ` Taylan Ulrich Bayırlı/Kammer
2015-10-19 19:03 ` Dmitry Gutov
2015-10-19 19:49 ` Taylan Ulrich Bayırlı/Kammer
2015-10-19 20:12 ` Alan Mackenzie
2015-10-19 21:01 ` Taylan Ulrich Bayırlı/Kammer
2015-10-20 9:53 ` Alan Mackenzie
2015-10-20 20:09 ` Taylan Ulrich Bayırlı/Kammer
2015-10-20 23:46 ` John Wiegley
2015-10-21 12:54 ` Taylan Ulrich Bayırlı/Kammer
2015-10-21 13:13 ` Alan Mackenzie [this message]
2015-10-20 6:00 ` David Kastrup
2015-10-19 14:50 ` David Kastrup
2015-10-19 8:22 ` Tom
2015-10-19 8:38 ` Andreas Schwab
2015-10-19 8:54 ` Tom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151021131353.GD2608@acm.fritz.box \
--to=acm@muc.de \
--cc=bruce.connor.am@gmail.com \
--cc=cwebber@dustycloud.org \
--cc=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
--cc=taylanbayirli@gmail.com \
--cc=xfq.free@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.