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: Fri, 08 Feb 2013 20:38:24 +0400 Message-ID: <51152A00.6070101@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> 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 1360341525 28158 80.91.229.3 (8 Feb 2013 16:38:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2013 16:38:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 08 17:39:05 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 1U3qyf-0006P9-Gh for ged-emacs-devel@m.gmane.org; Fri, 08 Feb 2013 17:39:05 +0100 Original-Received: from localhost ([::1]:35762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3qyM-0003Q6-In for ged-emacs-devel@m.gmane.org; Fri, 08 Feb 2013 11:38:46 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3qyK-0003Pn-7Y for emacs-devel@gnu.org; Fri, 08 Feb 2013 11:38:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3qyH-0005ok-0i for emacs-devel@gnu.org; Fri, 08 Feb 2013 11:38:44 -0500 Original-Received: from forward3.mail.yandex.net ([77.88.46.8]:50498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3qyE-0005ns-Vp; Fri, 08 Feb 2013 11:38:39 -0500 Original-Received: from smtp3.mail.yandex.net (smtp3.mail.yandex.net [77.88.46.103]) by forward3.mail.yandex.net (Yandex) with ESMTP id 99E96B40CAE; Fri, 8 Feb 2013 20:38:24 +0400 (MSK) Original-Received: from smtp3.mail.yandex.net (localhost [127.0.0.1]) by smtp3.mail.yandex.net (Yandex) with ESMTP id 7002D1BA0833; Fri, 8 Feb 2013 20:38:24 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp3.mail.yandex.net (nwsmtp/Yandex) with ESMTP id cOhud4EO-cOhGAdZV; Fri, 8 Feb 2013 20:38:24 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1360341504; bh=HX06tMT6DCnGgdnRTnOtOFqfwYAzWqwSKzenxxkfVMg=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=TYJwes7gI8vEGBh7A/F/OS+idiW01RZ+rRunK/it8THX1f7sjSJLE2BX2AakFjqK1 Ac5fbMvOIzYLl8cJsWfx+b4qgrk68gDNVPHIBEyiYqO5g5+kaTHKrhre2/Ro5o/m2U RmzUysKJgfcHZck9txXxzKq2XSHjT6xE1ukCbFCk= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <836222983u.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 77.88.46.8 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:156896 Archived-At: On 02/08/2013 06:46 PM, Eli Zaretskii wrote: > Btw, if you are serious about finding a solution to the long-line > display misfeature (or any other too-slow redisplay situation), I > generally find it necessary to do precision timing of the suspicious > parts of code, because otherwise it is impossible to find the actual > culprits. On GNU/Linux, I use the following simple function: Ah, please, there is a difference between 2013 and 1980. 1) perf record -e stalled-cycles-frontend -e stalled-cycles-backend -F 10000 [workload] 2) perf report --stdio ==> 25.18% emacs emacs [.] scan_buffer 7.04% emacs emacs [.] bidi_resolve_weak ... 3) perf annotate scan_buffer --stdio ==> : while (cursor >= ceiling_addr) : { : unsigned char *scan_start = cursor; : : while (*cursor != target && --cursor >= ceiling_addr) 65.74 : 526620: movzbl (%r14),%eax 6.46 : 526624: cmp %r15d,%eax 0.17 : 526627: je 526632 27.33 : 526629: sub $0x1,%r14 0.03 : 52662d: cmp %r14,%rbx 0.19 : 526630: jbe 526620 : ; So, ~90% of time spent in scan_buffer is: 799 while (*cursor != target && --cursor >= ceiling_addr) 800 ; Dmitry