From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: web-mode.el and speed Date: Tue, 08 Oct 2013 09:21:40 +0300 Message-ID: <83y564470r.fsf@gnu.org> References: <8338oc6e4y.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1381213320 6931 80.91.229.3 (8 Oct 2013 06:22:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2013 06:22:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Bois Francois-Xavier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 08 08:22:02 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VTQgC-00055r-13 for ged-emacs-devel@m.gmane.org; Tue, 08 Oct 2013 08:22:00 +0200 Original-Received: from localhost ([::1]:34846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTQgB-0000wx-K4 for ged-emacs-devel@m.gmane.org; Tue, 08 Oct 2013 02:21:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTQg2-0000wY-Qq for emacs-devel@gnu.org; Tue, 08 Oct 2013 02:21:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTQfw-0004gq-T1 for emacs-devel@gnu.org; Tue, 08 Oct 2013 02:21:50 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:46466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTQfw-0004gD-LE for emacs-devel@gnu.org; Tue, 08 Oct 2013 02:21:44 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MUC005006TSGF00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Tue, 08 Oct 2013 09:21:43 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MUC005507060ZC0@a-mtaout20.012.net.il>; Tue, 08 Oct 2013 09:21:43 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163991 Archived-At: > From: Bois Francois-Xavier > Date: Mon, 7 Oct 2013 22:21:30 +0200 > Cc: emacs-devel@gnu.org > > I think that a function that would not rely on regexp could improve > drastically the performance. > For seconds are needed to load the html5-spec page. And most of the time is > spent identifying tags. So any micro optimization can have a huge impact. > > (I have previously won 20% in perfomance when I modified the tag attributes > parser function to use chars instead of strings. I would have never thought > that the gain would be so large) As others have pointed out, you are trying to optimize without making any measurements. This methodology is known to lead to wrong conclusions. So you are well advised to try skip-chars-forward and see if it is fast enough for your use case.