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: Case mapping of sharp s Date: Thu, 19 Nov 2009 16:49:26 -0500 Message-ID: References: <4B05A11F.5000700@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258667395 11393 80.91.229.12 (19 Nov 2009 21:49:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 21:49:55 +0000 (UTC) Cc: emacs-devel@gnu.org, handa@m17n.org To: grischka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 19 22:49:48 2009 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.50) id 1NBEsm-0005qb-7A for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 22:49:40 +0100 Original-Received: from localhost ([127.0.0.1]:52442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBEsl-0004hB-Iq for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 16:49:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBEsg-0004gw-VO for emacs-devel@gnu.org; Thu, 19 Nov 2009 16:49:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBEsc-0004eT-Hq for emacs-devel@gnu.org; Thu, 19 Nov 2009 16:49:34 -0500 Original-Received: from [199.232.76.173] (port=45047 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBEsc-0004eQ-BM for emacs-devel@gnu.org; Thu, 19 Nov 2009 16:49:30 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:58282) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NBEsc-0001YD-1O for emacs-devel@gnu.org; Thu, 19 Nov 2009 16:49:30 -0500 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nAJLnQfq001810; Thu, 19 Nov 2009 16:49:26 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 8DD383A0FA; Thu, 19 Nov 2009 16:49:26 -0500 (EST) In-Reply-To: <4B05A11F.5000700@gmx.de> (grischka's message of "Thu, 19 Nov 2009 20:48:47 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3410=0 X-detected-operating-system: by monty-python.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:117303 Archived-At: > Actually I think there is something simply wrong with the simple > search, as it's much slower even for single chars (where bm doesn't > have any advantage) and additionally in some weird random fashion > it's again slower for backwards search, such as 14, 37, 66 ... 94 > secs, where the bm takes 0.5 secs and simple forward constantly > ~3.7 secs, all for isearch'ing one character in a 100Mb file. I can guess why it's much slower going backward: the simple search operates on chars rather than bytes. The internal encoding we use (currently based on utf-8) is designed to be easy to parse going forward but not so easy going backward (IIRC our encoding is actually even a bit more painful in this case than pure utf-8). BM on the other hand works on bytes, so there's no such slowdown. As for the general slowdown, it may also be due to having to parse the char (encoded in utf-8) and then look it up in the corresponding char table (a tree of arrays). But maybe we're doing something silly somewhere. Stefan