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: Region cache for bidi paragraphs? Date: Mon, 05 Aug 2013 09:26:37 +0400 Message-ID: <51FF378D.9000305@yandex.ru> References: <51FB93C5.1020804@yandex.ru> <83bo5gyytp.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 1375680432 28480 80.91.229.3 (5 Aug 2013 05:27:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Aug 2013 05:27:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 05 07:27:13 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 1V6DJz-0003Hl-7l for ged-emacs-devel@m.gmane.org; Mon, 05 Aug 2013 07:27:07 +0200 Original-Received: from localhost ([::1]:57262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6DJy-0000Q4-Kg for ged-emacs-devel@m.gmane.org; Mon, 05 Aug 2013 01:27:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6DJp-0000Pb-Ie for emacs-devel@gnu.org; Mon, 05 Aug 2013 01:27:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6DJi-0005oG-Gg for emacs-devel@gnu.org; Mon, 05 Aug 2013 01:26:57 -0400 Original-Received: from forward2l.mail.yandex.net ([84.201.143.145]:40225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6DJa-0005n7-Q1; Mon, 05 Aug 2013 01:26:42 -0400 Original-Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward2l.mail.yandex.net (Yandex) with ESMTP id 08D8E1AC0D24; Mon, 5 Aug 2013 09:26:38 +0400 (MSK) Original-Received: from smtp1h.mail.yandex.net (localhost [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id A4CA11340538; Mon, 5 Aug 2013 09:26:38 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id wiTqt4VOVu-QcxiIuVw; Mon, 5 Aug 2013 09:26:38 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1375680398; bh=F0QsLG04uZeghvQm8UQGFFwnIhaBSbvcE2lFVAq0f2Q=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ZJV657zHUqqQ981v3SMblDk6aEMXw0UlF03MHMqnyZGuCtV/MwbOwsIpKEGL2GyzX DYMoZu6cmFCCxxUVTfMaFG4KgZnqA9TD1PydW0Hh1odcZiURfWBPsHXraxmBoDzRsn uC9NjIZOLehP33RuRNhkMUzzVhdHMPnVsYdQSoqA= Authentication-Results: smtp1h.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: <83bo5gyytp.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 84.201.143.145 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:162427 Archived-At: On 08/02/2013 06:03 PM, Eli Zaretskii wrote: > Does it give any real speedup, and if so, in what use cases? My benchmarks was: ;; 0 (defun scroll-both () (interactive) (let ((start (float-time))) (progn (goto-char (point-min)) (dotimes (n 500) (progn (scroll-up) (redisplay))) (goto-char (point-max)) (dotimes (n 500) (progn (scroll-down) (redisplay))) (message "Elapsed %f seconds" (- (float-time) start))))) ;; 1 (defun scroll-both-line () (interactive) (let ((start (float-time))) (progn (goto-char (point-min)) (dotimes (n 5000) (progn (forward-line 1) (redisplay))) (goto-char (point-max)) (dotimes (n 5000) (progn (forward-line -1) (redisplay))) (message "Elapsed %f seconds" (- (float-time) start))))) Input 0: xdisp.c Input 1: ASCII text 30K lines, 1000chr/line, no paragraph separators Input 2: ASCII text 30K lines, 1000chr/line, paragraph separator after each line Time is in seconds as reported, smaller is better. Input 0 1 0 cached 1 cached -------+--------+--------+--------+------- 0 30.2 12.7 30.4 12.7 1 11.1 34.5 6.4 15.3 2 6.0 13.1 5.2 13.1 ------------------------------------------ I.e. longer lines and smaller amount of paragraph separators => more benefits from using region cache. Dmitry .