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: Thu, 13 Jun 2013 07:45:16 -0700 Message-ID: <51B9DAFC.3010502@cs.ucla.edu> References: <500039B7.8050106@cs.ucla.edu> <51B0B137.5020705@cs.ucla.edu> <51B3D1B5.8020807@cs.ucla.edu> <51B42B07.5090209@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080600040104060500050802" X-Trace: ger.gmane.org 1371135498 25917 80.91.229.3 (13 Jun 2013 14:58:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Jun 2013 14:58:18 +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 Thu Jun 13 16:58:19 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 1Un8yf-0008Ho-Ha for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jun 2013 16:58:18 +0200 Original-Received: from localhost ([::1]:43067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un8yf-0007z1-4d for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jun 2013 10:58:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un8n0-0004o8-DH for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2013 10:46:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Un8mp-0008Jb-1c for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2013 10:46:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un8mo-0008JM-9w for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2013 10:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Un8mn-0008GP-Vx for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2013 10:46: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: Thu, 13 Jun 2013 14:46:01 +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.137113475131728 (code B ref 11935); Thu, 13 Jun 2013 14:46:01 +0000 Original-Received: (at 11935) by debbugs.gnu.org; 13 Jun 2013 14:45:51 +0000 Original-Received: from localhost ([127.0.0.1]:41541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Un8mc-0008Fg-Is for submit@debbugs.gnu.org; Thu, 13 Jun 2013 10:45:50 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:37943) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Un8mY-0008FJ-UI for 11935@debbugs.gnu.org; Thu, 13 Jun 2013 10:45:48 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 2E7E339E8008; Thu, 13 Jun 2013 07:45:40 -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 K6EOcBHA6fqt; Thu, 13 Jun 2013 07:45:36 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 80588A60038; Thu, 13 Jun 2013 07:45:21 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 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 3.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:75051 Archived-At: This is a multi-part message in MIME format. --------------080600040104060500050802 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 06/09/13 08:57, Stefan Monnier wrote: >> > If it's unacceptable to maintain both a macro and a function >> > implementation for a few primitives, we can simply have the >> > latter invoke the former -- that way, there's only one actual >> > implementation. > I could live with that. OK, attached is a patch to do that. I think this is a bit better than a macro-only implementation as it makes the way forward clearer for a few years from now, when we can assume GCC 4.8 or later. This fixes the -O0 performance problem, so developers using pre-4.8 GCC (or clang) won't suffer. Here are the measurements, where "old patch" refers to the previous version of the patch with the XINT etc. macros removed, and "new patch" refers to the attached. The benchmark is the same as before. As before, the low-order digits probably aren't that significant. Fedora 17 x86-64, AMD Phenom II X4 910e Clang 3.0 (Fedora 17) GCC 4.8.1 (I built it) single-process make (no -j) (benchmark make \ rm fns.o; rm *.o; make \ 100000) xdisp.o make emacs make emacs bootstrap GCC -O2 unpatched 1.57 11.3 9.6 110 843 GCC -O2 old patch 1.57 11.1 9.9 119 847 GCC -O2 new patch 1.38 10.9 9.9 118 850 GCC -Og unpatched 1.15 5.9 9.2 80 860 GCC -Og old patch 1.15 6.4 9.5 87 879 GCC -Og new patch 1.15 6.4 9.5 86 874 GCC -O0 unpatched 2.89 3.1 12.4 57 1099 GCC -O0 old patch 21.66 3.0 20.0 63 2442 GCC -O0 new patch 2.89 2.9 13.2 56 1265 Clang -O2 unpatched 1.57 6.3 8.3 65 818 Clang -O2 old patch 1.34 6.8 8.5 70 826 Clang -O2 new patch 1.34 6.8 8.5 70 830 Clang -O0 unpatched 3.72 1.5 10.9 34 1159 Clang -O0 old patch 17.89 1.4 17.0 39 2309 Clang -O0 new patch 3.92 1.4 11.8 34 1332 --------------080600040104060500050802 Content-Type: text/plain; charset=us-ascii; name="inline4n.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="inline4n.txt" PT09IG1vZGlmaWVkIGZpbGUgJ0NoYW5nZUxvZycKLS0tIENoYW5nZUxvZwkyMDEzLTA2LTEx IDE4OjA1OjA1ICswMDAwCisrKyBDaGFuZ2VMb2cJMjAxMy0wNi0xMyAxNDoxNzowMSArMDAw MApAQCAtMSwzICsxLDkgQEAKKzIwMTMtMDYtMTMgIFBhdWwgRWdnZXJ0ICA8ZWdnZXJ0QGNz LnVjbGEuZWR1PgorCisJVXNlIGZ1bmN0aW9ucywgbm90IG1hY3JvcywgZm9yIFhJTlQgZXRj LiAoQnVnIzExOTM1KS4KKwkqIGNvbmZpZ3VyZS5hYyAoV0FSTl9DRkxBR1MpOiBSZW1vdmUg LVdiYWQtZnVuY3Rpb24tY2FzdCwKKwlhcyBpdCBnZW5lcmF0ZXMgYm9ndXMgd2FybmluZ3Mg YWJvdXQgcmVhc29uYWJsZSBjYXN0cyBvZiBjYWxscy4KKwogMjAxMy0wNi0xMSAgUGF1bCBF Z2dlcnQgIDxlZ2dlcnRAY3MudWNsYS5lZHU+CiAKIAktLXdpdGhvdXQtYWxsIHNob3VsZCBp bXBseSAtLXdpdGgtZmlsZS1ub3RpZmljYXRpb249bm8uICAoQnVnIzE0N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VjdCk7CitMSVNQX0lOTElORSBib29sIFBTRVVET1ZFQ1RPUlAgKExpc3BfT2JqZWN0 LCBpbnQpOworTElTUF9JTkxJTkUgYm9vbCBTQVZFX1ZBTFVFUCAoTGlzcF9PYmplY3QpOwor TElTUF9JTkxJTkUgdm9pZCBzZXRfc3ViX2NoYXJfdGFibGVfY29udGVudHMgKExpc3BfT2Jq ZWN0LCBwdHJkaWZmX3QsCisJCQkJCSAgICAgIExpc3BfT2JqZWN0KTsKK0xJU1BfSU5MSU5F IGJvb2wgU1RSSU5HUCAoTGlzcF9PYmplY3QpOworTElTUF9JTkxJTkUgYm9vbCBTVUJfQ0hB Ul9UQUJMRV9QIChMaXNwX09iamVjdCk7CitMSVNQX0lOTElORSBib29sIFNVQlJQIChMaXNw X09iamVjdCk7CitMSVNQX0lOTElORSBib29sIChTWU1CT0xQKSAoTGlzcF9PYmplY3QpOwor TElTUF9JTkxJTkUgYm9vbCAoVkVDVE9STElLRVApIChMaXNwX09iamVjdCk7CitMSVNQX0lO TElORSBib29sIFdJTkRPV1AgKExpc3BfT2JqZWN0KTsKK0xJU1BfSU5MSU5FIHN0cnVjdCBM aXNwX1NhdmVfVmFsdWUgKlhTQVZFX1ZBTFVFIChMaXNwX09iamVjdCk7CisKKy8qIERlZmlu ZWQgaW4gYnVmZmVyLmMuICAqLworZXh0ZXJuIExpc3BfT2JqZWN0IFFvdmVybGF5cDsKKwor LyogRGVmaW5lZCBpbiBjaGFydGFiLmMuICAqLworZXh0ZXJuIExpc3BfT2JqZWN0IGNoYXJf dGFibGVfcmVmIChMaXNwX09iamVjdCwgaW50KTsKK2V4dGVybiB2b2lkIGNoYXJfdGFibGVf c2V0IChMaXNwX09iamVjdCwgaW50LCBMaXNwX09iamVjdCk7CitleHRlcm4gaW50IGNoYXJf dGFibGVfdHJhbnNsYXRlIChMaXNwX09iamVjdCwgaW50KTsKKworLyogRGVmaW5lZCBpbiBk YXRhLmMuICAqLworZXh0ZXJuIExpc3BfT2JqZWN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KK30KK0xJU1BfSU5M SU5FIHZvaWQKK1hTRVRDRFIgKExpc3BfT2JqZWN0IGMsIExpc3BfT2JqZWN0IG4pCit7Cisg ICp4Y2RyX2FkZHIgKGMpID0gbjsKK30KKworLyogVGFrZSB0aGUgY2FyIG9yIGNkciBvZiBz b21ldGhpbmcgd2hvc2UgdHlwZSBpcyBub3Qga25vd24uICAqLworTElTUF9JTkxJTkUgTGlz cF9PYmplY3QKK0NBUiAoTGlzcF9PYmplY3QgYykKK3sKKyAgcmV0dXJuIChDT05TUCAoYykg PyBYQ0FSIChjKQorCSAgOiBOSUxQIChjKSA/IFFuaWwKKwkgIDogd3JvbmdfdHlwZV9hcmd1 bWVudCAoUWxpc3RwLCBjKSk7Cit9CitMSVNQX0lOTElORSBMaXNwX09iamVjdAorQ0RSIChM aXNwX09iamVjdCBjKQoreworICByZXR1cm4gKENPTlNQIChjKSA/IFhDRFIgKGMpCisJICA6 IE5JTFAgKGMpID8gUW5pbAorCSAgOiB3cm9uZ190eXBlX2FyZ3VtZW50IChRbGlzdHAsIGMp KTsKK30KKworLyogVGFrZSB0aGUgY2FyIG9yIGNkciBvZiBzb21ldGhpbmcgd2hvc2UgdHlw ZSBpcyBub3Qga25vd24uICAqLworTElTUF9JTkxJTkUgTGlzcF9PYmplY3QKK0NBUl9TQUZF IChMaXNwX09iamVjdCBjKQoreworICByZXR1cm4gQ09OU1AgKGMpID8gWENBUiAoYykgOiBR bmlsOworfQorTElTUF9JTkxJTkUgTGlzcF9PYmplY3QKK0NEUl9TQUZFIChMaXNwX09iamVj dCBjKQoreworICByZXR1cm4gQ09OU1AgKGMpID8gWENEUiAoYykgOiBRbmlsOworfQorCisv KiBJbiBhIHN0cmluZyBvciB2ZWN0b3IsIHRoZSBzaWduIGJpdCBvZiB0aGUgYHNpemUnIGlz IHRoZSBnYyBtYXJrIGJpdC4gICovCisKK3N0cnVjdCBMaXNwX1N0cmluZworICB7CisgICAg cHRyZGlmZl90IHNpemU7CisgICAgcHRyZ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HgpIChWRUNUT1JMSUtFUCAoeCkgJiYgIShBU0laRSAoeCkg JiBQU0VVRE9WRUNUT1JfRkxBRykpCi0jZGVmaW5lIE9WRVJMQVlQKHgpIChNSVNDUCAoeCkg JiYgWE1JU0NUWVBFICh4KSA9PSBMaXNwX01pc2NfT3ZlcmxheSkKLSNkZWZpbmUgTUFSS0VS UCh4KSAoTUlTQ1AgKHgpICYmIFhNSVNDVFlQRSAoeCkgPT0gTGlzcF9NaXNjX01hcmtlcikK LQorICAoSU5URUdFUlAgKHgpCQkJICAgICAgXAorICAgJiYgKFRZUEVfU0lHTkVEICh0eXBl KSA/IFRZUEVfTUlOSU1VTSAodHlwZSkgPD0gWElOVCAoeCkgOiAwIDw9IFhJTlQgKHgpKSBc CisgICAmJiBYSU5UICh4KSA8PSBUWVBFX01BWElNVU0gKHR5cGUpKQorCitMSVNQX0lOTElO RSBib29sCisoQ09OU1ApIChMaXNwX09iamVjdCB4KQoreworICByZXR1cm4gbGlzcF9oX0NP TlNQICh4KTsKK30KK0xJU1BfSU5MSU5FIGJvb2wKKyhGTE9BVFApIChMaXNwX09iamVjdCB4 KQoreworICByZXR1cm4gbGlzcF9oX0ZMT0FUUCAoeCk7Cit9CitMSVNQX0lOTElORSBib29s CisoTUlTQ1ApIChMaXNwX09iamVjdCB4KQoreworICByZXR1cm4gbGlzcF9oX01JU0NQICh4 KTsKK30KK0xJU1BfSU5MSU5FIGJvb2wKK1NUUklOR1AgKExpc3BfT2JqZWN0IHgpCit7Cisg IHJldHVybiBYVFlQRSAoeCkgPT0gTGlzcF9TdHJpbmc7Cit9CitMSVNQX0lOTElORSBib29s CisoU1lNQk9MUCkgKExpc3BfT2JqZWN0IHgpCit7CisgIHJldHVybiBsaXNwX2hfU1lNQk9M UCAoeCk7Cit9CitMSVNQX0lOTElORSBib29sCisoSU5URUdFUlApIChMaXNwX09iamVjdCB4 KQoreworICByZXR1cm4gbGlzcF9oX0lOVEVHRVJQICh4KTsKK30KK0xJU1BfSU5M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Cit7CisgIHJldHVybiBQU0VVRE9WRUNUT1JQIChhLCBQ VkVDX1dJTkRPV19DT05GSUdVUkFUSU9OKTsKK30KKworTElTUF9JTkxJTkUgYm9vbAorUFJP Q0VTU1AgKExpc3BfT2JqZWN0IGEpCit7CisgIHJldHVybiBQU0VVRE9WRUNUT1JQIChhLCBQ VkVDX1BST0NFU1MpOworfQorCitMSVNQX0lOTElORSBib29sCitXSU5ET1dQIChMaXNwX09i amVjdCBhKQoreworICByZXR1cm4gUFNFVURPVkVDVE9SUCAoYSwgUFZFQ19XSU5ET1cpOwor fQorCitMSVNQX0lOTElORSBib29sCitURVJNSU5BTFAgKExpc3BfT2JqZWN0IGEpCit7Cisg IHJldHVybiBQU0VVRE9WRUNUT1JQIChhLCBQVkVDX1RFUk1JTkFMKTsKK30KKworTElTUF9J TkxJTkUgYm9vbAorU1VCUlAgKExpc3BfT2JqZWN0IGEpCit7CisgIHJldHVybiBQU0VVRE9W RUNUT1JQIChhLCBQVkVDX1NVQlIpOworfQorCitMSVNQX0lOTElORSBib29sCitDT01QSUxF RFAgKExpc3BfT2JqZWN0IGEpCit7CisgIHJldHVybiBQU0VVRE9WRUNUT1JQIChhLCBQVkVD X0NPTVBJTEVEKTsKK30KKworTElTUF9JTkxJTkUgYm9vbAorQlVGRkVSUCAoTGlzcF9PYmpl Y3QgYSkKK3sKKyAgcmV0dXJuIFBTRVVET1ZFQ1RPUlAgKGEsIFBWRUNfQlVGRkVSKTsKK30K KworTElTUF9JTkxJTkUgYm9vbAorQ0hBUl9UQUJMRV9QIChMaXNwX09iamVjdCBhKQorewor ICByZXR1cm4gUFNFVURPVkVDVE9SUCAoYSwgUFZFQ19DSEFSX1RBQkxFKTsKK30KKworTElT UF9JTkxJTkUgYm9vbAorU1VCX0NIQVJfVEFCTEVfUCAoTGlzcF9PYmplY3QgYSkKK3sKKyAg cmV0dXJuIFBTRVVET1ZFQ1RPUlAgKGEsIFBWRUNfU1VCX0NIQVJfVEFCTEUpOworfQorCit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