all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Region cache for bidi paragraphs?
Date: Mon, 05 Aug 2013 09:26:37 +0400	[thread overview]
Message-ID: <51FF378D.9000305@yandex.ru> (raw)
In-Reply-To: <83bo5gyytp.fsf@gnu.org>

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
.




  reply	other threads:[~2013-08-05  5:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 11:11 Region cache for bidi paragraphs? Dmitry Antipov
2013-08-02 14:03 ` Eli Zaretskii
2013-08-05  5:26   ` Dmitry Antipov [this message]
2013-08-05 15:18     ` Eli Zaretskii
2013-08-05 16:00       ` Stefan Monnier
2013-08-05 16:52         ` Eli Zaretskii
2013-08-05 17:12           ` Dmitry Antipov
2013-08-05 17:17             ` Eli Zaretskii
2013-08-06  7:15           ` Dmitry Antipov
2013-08-06 14:51             ` Eli Zaretskii
2013-08-06 16:04               ` Yet another redisplay question Dmitry Antipov
2013-08-06 16:42                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51FF378D.9000305@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.