From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: Re: Execution speed Date: Sun, 19 Mar 2017 11:26:27 -0400 Message-ID: <878to1s2xo.fsf@holos> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489937200 23643 195.159.176.226 (19 Mar 2017 15:26:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Mar 2017 15:26:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 19 16:26:35 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpcj4-0005Ve-G0 for ged-emacs-devel@m.gmane.org; Sun, 19 Mar 2017 16:26:34 +0100 Original-Received: from localhost ([::1]:57179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpcjA-0000Kh-Cb for ged-emacs-devel@m.gmane.org; Sun, 19 Mar 2017 11:26:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpcj3-0000KN-K9 for emacs-devel@gnu.org; Sun, 19 Mar 2017 11:26:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpcj0-0000EV-GQ for emacs-devel@gnu.org; Sun, 19 Mar 2017 11:26:33 -0400 Original-Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]:32996) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cpcj0-0000Dy-Bn for emacs-devel@gnu.org; Sun, 19 Mar 2017 11:26:30 -0400 Original-Received: by mail-qk0-x22f.google.com with SMTP id y76so94547063qkb.0 for ; Sun, 19 Mar 2017 08:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=8H0kuL6UcHoboBppFG8Nl5+hnbVCAQf450v4lWaWYbg=; b=a0hBaXnbnTLLkiGCL0w+JXkHhF5/iRWTW1RPYUyvzi+t6RsmiiUVzZUjBIl1wiWX+h NB1UX7SkF+8AHnLPIy+u5LBy11Gqd+C9D3slzn0F6br7Ztuv4Dhw6HhIyF1yCe5KmPC1 5Ml+mqVH0IcQwZg7CdtgKQW3x3Ub5/wwA1ljDU9FfhIDZc0Td/rKVzlH7cFbRelTJ7kP tJKqxx9bcuIa3gbSjJ0odAku6tsvJwZNtI3Dkc3pZeimb5dCohoqZSCQ+oYKDQ9viNZs uSlVZVcckfE3W7kdj8gAZ/UuFgnoogr1oSx6HC3h+nK9HZalGjRASHacY9KJ94rLgyHJ SZcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=8H0kuL6UcHoboBppFG8Nl5+hnbVCAQf450v4lWaWYbg=; b=X3Zl1jZlUOPxP9eEdTtQGLlAffPWQgGTrDar41uS4BPwJgNROBIS6sJDpR3+RIudhE Ol/3UAXjhAcbNmS6YPPIrMzG5MXiOdxNAgAS5xT1Z+oOSeEZztyN92mSLghY3IWlsC1d mh9orr6LdOlPx3Arm3U8Vc9dMiKRQRoTwJ327bxL+EmGtycKWiBJoYrOuTokMdoERT9N MZMvp2ZPu9ec8aprLuv00pFR0J6t03bPQaIAvJ49a5ibvuF4idjYJ0FL88XpvCSDSIbs x1NsdLab+CWseuNvg52C+yQUerMt4xcSjiqtRc6PSCLYbWQUDZKSfbEBQOuDn7cYofqO c5eg== X-Gm-Message-State: AFeK/H2Kakcw1up+U5GUf7n8sKkJ7/PFh5YWSemWwh4+RSJDs9AHm36M84OhQJ+MtJl/y5H8 X-Received: by 10.55.169.71 with SMTP id s68mr19930431qke.137.1489937189345; Sun, 19 Mar 2017 08:26:29 -0700 (PDT) Original-Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id o16sm10443792qkl.67.2017.03.19.08.26.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Mar 2017 08:26:28 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id A5F0969117; Sun, 19 Mar 2017 11:26:27 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Sun, 19 Mar 2017 11:12:59 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:213155 Archived-At: Stefan Monnier 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