From: Mark Oteiza <mvoteiza@udel.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Execution speed
Date: Sun, 19 Mar 2017 11:26:27 -0400 [thread overview]
Message-ID: <878to1s2xo.fsf@holos> (raw)
In-Reply-To: <jwv1sttcnv2.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 19 Mar 2017 11:12:59 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Someone on SO reported a surprising behavior where a recursive
> implementation of `gcd` turned out faster than the iterative version:
>
> http://stackoverflow.com/questions/42792988/
>
> The more surprising thing is that when I try it I get the
> opposite result, even though it's basically on the same kind of system
> (GNU/Linx x86).
>
> I'm curious where the difference might come from. Could you guys try
> out the test?
>
> Just do `emacs -Q --batch -l .../ir-test.el`. Here's what I got:
>
> % emacs24 -Q --batch -l ~/tmp/ir-test.el
> Interpreted: Iterative=1.770s; Recursive=1.937s
> Bytecompiled: Iterative=1.187s; Recursive=1.496s
> % .../src/emacs -Q --batch -l ~/tmp/ir-test.el
> Interpreted: Iterative=4.496s; Recursive=4.595s
> Bytecompiled: Iterative=2.471s; Recursive=2.983s
>
> where `emacs24` is Debian's whereas the other one is my locally
> built&hacked version with debugging assertions and stuff.
Interesting. Arch Linux's repo emacs 25:
$ emacs -Q --batch -l ir-test.el
Interpreted: Iterative=2.302s; Recursive=1.956s
Bytecompiled: Iterative=1.349s; Recursive=1.214s
next prev parent reply other threads:[~2017-03-19 15:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-19 15:12 Execution speed Stefan Monnier
2017-03-19 15:26 ` Mark Oteiza [this message]
2017-03-19 15:32 ` Eli Zaretskii
2017-03-19 16:01 ` Tino Calancha
2017-03-19 16:14 ` Andreas Politz
2017-03-19 16:33 ` Teemu Likonen
2017-03-19 19:09 ` npostavs
2017-03-19 22:49 ` Phil Sainty
2017-03-20 10:36 ` Performance of lexical closures in interpreted code? (was Re: Execution speed) Phil Sainty
2017-03-20 12:50 ` Stefan Monnier
2017-03-20 13:12 ` Stefan Monnier
2017-03-19 22:30 ` Execution speed Phil Sainty
2017-03-20 9:46 ` Ivan Kanis
2017-03-20 10:46 ` Philippe Vaucher
2017-03-20 14:26 ` Filipp Gunbin
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=878to1s2xo.fsf@holos \
--to=mvoteiza@udel.edu \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.