From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.bugs Subject: bug#24100: [PATCH 0/4] Some regex dead-code elimination Date: Thu, 28 Jul 2016 19:00:28 +0200 Message-ID: <1469725228-24151-1-git-send-email-mina86@mina86.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1469725289 5178 80.91.229.3 (28 Jul 2016 17:01:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 17:01:29 +0000 (UTC) To: 24100@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 28 19:01:19 2016 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 1bSogQ-0004gk-RR for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 19:01:19 +0200 Original-Received: from localhost ([::1]:54744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSogP-0000mV-Vx for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 13:01:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSogC-0000kK-Li for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:01:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSogA-0001zu-Kt for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:01:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSogA-0001zq-HH for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bSogA-000690-6C for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michal Nazarewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jul 2016 17:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24100 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146972524723587 (code B ref -1); Thu, 28 Jul 2016 17:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jul 2016 17:00:47 +0000 Original-Received: from localhost ([127.0.0.1]:49519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSofu-00068N-O5 for submit@debbugs.gnu.org; Thu, 28 Jul 2016 13:00:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSoft-000685-Ak for submit@debbugs.gnu.org; Thu, 28 Jul 2016 13:00:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSofm-0001vB-Up for submit@debbugs.gnu.org; Thu, 28 Jul 2016 13:00:40 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSofm-0001uy-SG for submit@debbugs.gnu.org; Thu, 28 Jul 2016 13:00:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSofk-0000Wu-Di for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:00:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSofi-0001tz-DG for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:00:35 -0400 Original-Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:37432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSofi-0001tg-0E for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:00:34 -0400 Original-Received: by mail-wm0-x236.google.com with SMTP id i5so117289904wmg.0 for ; Thu, 28 Jul 2016 10:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=JkYr8Qb++viTBqYYoO2s4Yc4sCMUMrXCrmiVP8PYO78=; b=fbvA9EFqz7sQZ0ePtrfqHv8h9aVKk8fNapopreFpG2HApl/pZ0NP6Zkwhbuq/DR4lS vXzVBSa9PtfF5XesUb1lIeguhwyTlso3XdJSrWBhlkC4QX4FYkuMjZyaYK6wYiRbiteO mnUu3lzHbDIAHIGp8bbt79m135cZKPTs61EimcBmMsqhc3JvKabFTpw+wAwKIqf9TCfd UCoR6jUWYNQvxT/1qL35yva2L5sdYQi0ZAYPMgWVuchtKR+2p0VKIj5V/B51YDAwYXUI bE3Re4NcG4ZXn7Of1xlFds0tKW7a9iDr7ND4mTfn5kZQ3BGFM4qu5hq+Tyjn9hq3U6Up 8RhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=JkYr8Qb++viTBqYYoO2s4Yc4sCMUMrXCrmiVP8PYO78=; b=kNvdxfM9GTx771o1HShdDt5ssCq9ZBF/z4gFaTgT471+j0H9HfQ9eZgIkLnbK+mPp8 AAXVWojaUFg1odxMve7DTaHJusomSNeD8Oz0nVYUcPSscO25FMdhCWHVlpOmNUeDMP7k Y/s45AAENXeL916EhXbUHEv+29e7XuGZCVcJ0iBbuocTFauUZ5d6egr9SQHiELFOekAr CW1U34wSSdZ4R0QEUW1xbYVEhF53vQcLt3iK6xmdQ0ut/NL7r1pQCjakd9EATxvY3N4a 0aaz0imkm5LAQxGM0V0pNe1W2/bKsLJr11bqxwLyvHKrTE+YRy7thRoASkG1AcCGR+S2 vsQQ== X-Gm-Message-State: AEkoous/obCcInx7TWlj1EWb5uFX7KDVaJOvsTt5Kbl5N9vJqbnyBgsXj2NYus6nh8ieQL1N X-Received: by 10.194.52.72 with SMTP id r8mr28520803wjo.166.1469725232361; Thu, 28 Jul 2016 10:00:32 -0700 (PDT) Original-Received: from mpn.zrh.corp.google.com ([172.16.113.135]) by smtp.gmail.com with ESMTPSA id x133sm13159483wmf.16.2016.07.28.10.00.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 10:00:31 -0700 (PDT) Original-Received: by mpn.zrh.corp.google.com (Postfix, from userid 126942) id E4E431E028B; Thu, 28 Jul 2016 19:00:30 +0200 (CEST) X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:121637 Archived-At: The first patch is just a minor cleanup, the rests bank on the observation that Emacs only ever uses its own regex syntax. Overall, this shrinks Emacs by over 60 kB and expecetdly also speeds it up. This patchest is put on top of my previous on from bug#24009. The whole branch can be seen at https://github.com/mina86/emacs/. Unless there are objections, I’ve submit it in a week or so. Michal Nazarewicz (4): Remove dead opcodes in regex bytecode Get rid of re_set_syntax Get rid of re_set_whitespace_regexp Hardcode regex syntax to remove dead code handling different syntax src/regex.c | 101 ++++++++++++++++++++++++++++++++++------------------------- src/regex.h | 20 ++++++++++-- src/search.c | 17 +++------- 3 files changed, 80 insertions(+), 58 deletions(-) -- 2.8.0.rc3.226.g39d4020