all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Alan Mackenzie <acm@muc.de>, emacs-devel@gnu.org
Subject: Re: Scrolling xdisp.c.  Room for optimisation in syntax.c/CC Mode.
Date: Mon, 20 Oct 2014 09:29:51 +0200	[thread overview]
Message-ID: <5444B9EF.4050506@gmx.at> (raw)
In-Reply-To: <20141018202839.GB5924@acm.acm>

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

Results for Windows XP with CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3'
--enable-checking=yes --enable-check-lisp-object-type=yes:


Unmodified xdisp.c from trunk:

24.3 1007 scrolls, total time = 105.60900020599365s.
24.4 1007 scrolls, total time = 73.21900010108948s.
25.0 1007 scrolls, total time = 318.5629997253418s.


xdisp.c from trunk with odd apostrophes eradicated:

24.3 1007 scrolls, total time = 100.1240005493164s.
24.4 1007 scrolls, total time = 60.13900017738342s.
25.0 1007 scrolls, total time = 197.95300006866455s.


I can't test with older versions since those don't have
`scroll-down-command' here.

So while it might be worthwhile to do such an optimization, here the
great differenece is the 3-to-5-fold increase of execution time from
24.4 to 25.0 for which I don't have an explanation.  The cc-mode used is
always the one bundled with the respective Emacs version.

martin



BTW, if you want to quickly visualize constructs like

(defconst odd-apostrophes
   "/\\*\\([^*']\\|\\*+[^*'/]\\)*\\(\\**'\\([^*']\\|\\*+[^*'/]\\)*\\**'\\([^*']\\|\\*+[^*'/]\\)*\\)*\\**\\('\\)\\([^*']\\|\\*+[^*'/]\\)*\\*+/"
)

without adding comments like

   ;;     1                        2       3                             4                                5      6

you can use the regexp-lock.el package I attached here ;-)

[-- Attachment #2: regexp-lock.el.gz --]
[-- Type: application/gzip, Size: 12605 bytes --]

  parent reply	other threads:[~2014-10-20  7:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 18:19 Scrolling xdisp.c. Room for optimisation in syntax.c/CC Mode Alan Mackenzie
2014-10-18 20:28 ` Alan Mackenzie
2014-10-19 16:37   ` Ulrich Mueller
2014-10-19 17:49     ` Eli Zaretskii
2014-10-19 18:05       ` Ulrich Mueller
2014-10-20  1:41     ` Stefan Monnier
2014-10-20  7:24       ` Ulrich Mueller
2014-10-20 15:45         ` Stefan Monnier
2014-10-20 16:55           ` Ulrich Mueller
2014-10-20  7:29   ` martin rudalics [this message]
2014-10-20 11:47     ` Alan Mackenzie
2014-10-20 12:05       ` martin rudalics
2014-10-20 12:22         ` Óscar Fuentes

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=5444B9EF.4050506@gmx.at \
    --to=rudalics@gmx.at \
    --cc=acm@muc.de \
    --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.