From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#11935: XINT etc. should be functions Date: Sat, 08 Jun 2013 17:52:05 -0700 Organization: UCLA Computer Science Department Message-ID: <51B3D1B5.8020807@cs.ucla.edu> References: <500039B7.8050106@cs.ucla.edu> <51B0B137.5020705@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1370739189 29819 80.91.229.3 (9 Jun 2013 00:53:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Jun 2013 00:53:09 +0000 (UTC) Cc: 11935@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 09 02:53:08 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1UlTsa-0004uQ-DH for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jun 2013 02:53:08 +0200 Original-Received: from localhost ([::1]:48925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlTsa-0004WE-0z for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jun 2013 20:53:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlTsV-0004Vy-Aw for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2013 20:53:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UlTsU-0005zK-AJ for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2013 20:53:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlTsU-0005yU-7T for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2013 20:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UlTsU-0007PT-Bc for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2013 20:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jun 2013 00:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11935 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 11935-submit@debbugs.gnu.org id=B11935.137073914728402 (code B ref 11935); Sun, 09 Jun 2013 00:53:02 +0000 Original-Received: (at 11935) by debbugs.gnu.org; 9 Jun 2013 00:52:27 +0000 Original-Received: from localhost ([127.0.0.1]:52323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UlTrq-0007Nq-Eg for submit@debbugs.gnu.org; Sat, 08 Jun 2013 20:52:27 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:51639) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UlTrh-0007N2-72 for 11935@debbugs.gnu.org; Sat, 08 Jun 2013 20:52:18 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 9933F39E8105; Sat, 8 Jun 2013 17:52:06 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W89SchyTi2yp; Sat, 8 Jun 2013 17:52:06 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-71-108-49-126.lsanca.fios.verizon.net [71.108.49.126]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 014E839E8100; Sat, 8 Jun 2013 17:52:05 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74916 Archived-At: On 06/06/13 09:42, Stefan Monnier wrote: > Having XCONS and friends duplicated into a macro version and a function > version is a non-starter for me. Yes, I didn't like those macros either. I'll remove them; they're no longer needed now that GCC has the -Og option. In case you haven't run into it yet, -Og means "optimize for debugging", and causes GCC to generate code that's easy to debug, without having the big runtime performance penalty of -O0. Like -O2 but unlike -O0, with -Og the CPU time for my little Lisp nthcdr benchmark is unaffected by the proposed patch (assuming those macros are removed). C compilation time is considerably faster for -Og than for -O2; it's not as fast as -O0, but for the common case of changing one C source file and then typing "make emacs", -Og is faster than -O0 (because bootstrap-emacs runs faster) and is a tad faster than -O2 (because the C compiler runs faster). Here are the detailed times, if you're curious. I got these on a Fedora 17 x86-64 (AMD Phenom II X4 910e) that was otherwise unloaded. I used plain 'make' without parallelism. Everything was built with GCC 4.8.1 and with Texinfo 5.1. All times are user+system CPU times; the low-order digits of the times aren't that reliable. (benchmark make \ rm fns.o; rm *.o; make \ 100000) xdisp.o make emacs make emacs bootstrap -O0 unpatched 2.89 3.1 12.4 57 1099 -O0 patched 21.66 3.0 20.0 63 2442 -Og unpatched 1.15 5.9 9.2 80 860 -Og patched 1.15 6.4 9.5 87 879 -O2 unpatched 1.57 11.3 9.6 110 843 -O2 patched 1.57 11.1 9.9 119 847 In (benchmark 100000) the -Og code runs faster than -O2, which is surprising, but I think it's an anomaly; I may find the time to fire off a performance bug-report to the GCC developers.