From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Long lines and bidi Date: Mon, 11 Feb 2013 11:54:57 +0400 Message-ID: <5118A3D1.2050300@yandex.ru> References: <877gmp5a04.fsf@ed.ac.uk> <83vca89izh.fsf@gnu.org> <5110906D.7020406@yandex.ru> <83fw1aac3d.fsf@gnu.org> <51120360.4060104@yandex.ru> <51127363.5030203@yandex.ru> <834nhp9u9j.fsf@gnu.org> <5114FEBB.8020201@yandex.ru> <838v6y99wk.fsf@gnu.org> <836222983u.fsf@gnu.org> <51152A00.6070101@yandex.ru> <83y5ey7npl.fsf@gnu.org> <5115C3BC.8020203@cs.ucla.edu> <83txpl7u3w.fsf@gnu.org> <5116113D.5070707@cs.ucla.edu> <83mwvd7qlx.fsf@gnu.org> <83r4ko5cpv.fsf@gnu.org> <511884F5.6030806@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1360569310 26302 80.91.229.3 (11 Feb 2013 07:55:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2013 07:55:10 +0000 (UTC) Cc: Eli Zaretskii , Paul Eggert To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 11 08:55:31 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 1U4oEc-0000V8-Sm for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2013 08:55:31 +0100 Original-Received: from localhost ([::1]:52409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4oEJ-0001LN-LB for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2013 02:55:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4oEF-0001IZ-3O for emacs-devel@gnu.org; Mon, 11 Feb 2013 02:55:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4oEC-0006tp-Gc for emacs-devel@gnu.org; Mon, 11 Feb 2013 02:55:07 -0500 Original-Received: from forward15.mail.yandex.net ([95.108.130.119]:47502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4oEC-0006rT-4w for emacs-devel@gnu.org; Mon, 11 Feb 2013 02:55:04 -0500 Original-Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward15.mail.yandex.net (Yandex) with ESMTP id 71A9D9E0DED; Mon, 11 Feb 2013 11:55:00 +0400 (MSK) Original-Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id 7C24CE4050B; Mon, 11 Feb 2013 11:54:59 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id svdOZp6W-swdmPxkA; Mon, 11 Feb 2013 11:54:59 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1360569299; bh=woAouddBliH0vcTbm4C4owE7A6S3KLSmA0aJIgchRmM=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Qh5Mz7MGMBQwRy5AiW7VuqwV0iOQnCg1dfjRK2uyWvaaOKqD7BZdpjAL0qDpjttTT vUj2WtQK7RLmqXRp72ocvANe7E/+4fe0vSpd0rc9H8v/4sddnL4rIZqmp7hdIHyKYN J6lCJ5HWgpHk+sbEqBBDE6A+J2FA0YFbBc3j1OYo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <511884F5.6030806@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 95.108.130.119 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:156958 Archived-At: On 02/11/2013 09:43 AM, Dmitry Antipov wrote: > Yet another interesting profile (generated by scroll-both micro-benchmark with > r111730) is shown below. > > Input is 4K lines, each line is ~27K bytes, Imla'ei (modern Arabic) script. IIUC > this R2L text with long lines should push bidi really hard, but ... bidi core > routines (by itself) are almost irrelevant in the profile: > > 39.96% emacs emacs [.] scan_buffer > 28.72% emacs emacs [.] buf_charpos_to_bytepos > 21.82% emacs emacs [.] buf_bytepos_to_charpos > 0.59% emacs emacs [.] re_match_2_internal ... and with Paul's mem(r)chr patch it is: 43.38% emacs emacs [.] buf_charpos_to_bytepos 28.42% emacs emacs [.] buf_bytepos_to_charpos 13.10% emacs libc-2.16.so [.] memrchr 0.85% emacs emacs [.] re_match_2_internal ... So I should vote YES. This is simple optimization which really makes sense, and I suspect that the "less usual" input is, the more sense it has. Dmitry