From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Compiling Elisp to a native code with a GCC plugin Date: Wed, 15 Sep 2010 16:07:32 +0200 Message-ID: References: <87bp805ecr.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284559686 13663 80.91.229.12 (15 Sep 2010 14:08:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Sep 2010 14:08:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 15 16:08:01 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OvseW-0003TM-Bc for ged-emacs-devel@m.gmane.org; Wed, 15 Sep 2010 16:08:01 +0200 Original-Received: from localhost ([127.0.0.1]:45338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvseU-00033l-JU for ged-emacs-devel@m.gmane.org; Wed, 15 Sep 2010 10:07:58 -0400 Original-Received: from [140.186.70.92] (port=43227 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvseF-0002x9-Ro for emacs-devel@gnu.org; Wed, 15 Sep 2010 10:07:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvseC-0001LC-4r for emacs-devel@gnu.org; Wed, 15 Sep 2010 10:07:43 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:57908) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvseB-0001Kw-Vr for emacs-devel@gnu.org; Wed, 15 Sep 2010 10:07:40 -0400 Original-Received: from ceviche.home (vpn-132-204-232-22.acd.umontreal.ca [132.204.232.22]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o8FE7Y3Z025436; Wed, 15 Sep 2010 10:07:35 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id C0DCD66289; Wed, 15 Sep 2010 16:07:32 +0200 (CEST) In-Reply-To: (Leo's message of "Wed, 15 Sep 2010 11:47:24 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3622=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130207 Archived-At: >> As I recall, in my profiles, the GC and the regexp matcher were more >> costly the bytecode interpreter (though of course this is >> workload-dependent). > Regarding regexp matcher, do you know if performance will be improved by > using pcre? Using a different regexp-engine might be a good idea. But there are two issues: - Emacs needs to be able to match on buffer text rather than only on strings. Buffer text is made of 2 chunks of utf-8 byte arrays, so the regexp engine needs to be able to handle a whole in the middle of its input. - The main problem with Emacs regexps right now is that they have pathological cases where the match-time is enormous (potentially exponential explosion in the size of the input string). To be worthwhile a replacement should address this problem, which basically needs it should not be based on backtracking. IIUC pcre suffers from the same 2nd problem, which in my book makes it a poor candidate for replacement. Stefan