all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: larsi@gnus.org, 23967@debbugs.gnu.org
Subject: bug#23967: 25.1.50; Slow compilation of ns-win.el
Date: Thu, 14 Jul 2016 17:54:23 +0300	[thread overview]
Message-ID: <83inw88e3k.fsf@gnu.org> (raw)
In-Reply-To: <CAM-tV-9kCUTVRVKQhZvT2cTOOo8MFNLvGUSY5wqB8KgiybOz=Q@mail.gmail.com> (message from Noam Postavsky on Wed, 13 Jul 2016 17:15:15 -0400)

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Wed, 13 Jul 2016 17:15:15 -0400
> Cc: Lars Ingebrigtsen <larsi@gnus.org>, 23967@debbugs.gnu.org
> 
> I ran the profiler on a compilation of ucs-normalize.el and found 2
> easy optimizations (ucs-normalize-block-compose-chars was using
> with-temp-buffer in a loop, so I lifted the it out of the loop; using
> regexp-opt-charset instead of regexp-opt saves some char-to-string
> conversion, sorting, and duplicate deletion). The attached patch
> brings the compilation down from 2.5 seconds to 0.8 seconds in my
> normal running Emacs, and using the bootstrap-emacs command posted by
> Lars (swapping ../lisp/international/ucs-normalize.el for
> ../lisp/term/ns-win.el) from 1m30s to 7s.

LGTM, thanks.

However, I'm worried that we have no test for ucs-normalize, so it's
hard to be sure the non-trivial functionality is unchanged, even
though your changes are pretty straightforward.

How about adding a test that uses the data in this file:

  http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt

ucs-normalize claims to have passed an old version of this, but I see
no existing way of re-running that test, did I miss something?

I'd feel much safer if the tests all pass at least as they did with
the old version.

> Could we call `byte-compile' on the byte-compiler functions after loading them?

Maybe, you will have to try.  The bootstrap of the byte compiler is
somewhat tricky, given all the dependencies (see COMPILE_FIRST in
lisp/Makefile.in).

Thanks.





  reply	other threads:[~2016-07-14 14:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 12:19 bug#23967: 25.1.50; Slow compilation of ns-win.el Lars Ingebrigtsen
2016-07-13 14:55 ` Eli Zaretskii
2016-07-13 21:15   ` Noam Postavsky
2016-07-14 14:54     ` Eli Zaretskii [this message]
2016-07-15  3:22       ` npostavs
2016-07-15  7:21         ` Eli Zaretskii
2016-07-16  2:46           ` npostavs
2016-07-16  6:43             ` Eli Zaretskii
2016-07-16 17:03               ` npostavs
2016-07-16 17:20                 ` Lars Ingebrigtsen
2016-07-17 16:20       ` npostavs

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=83inw88e3k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23967@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=npostavs@users.sourceforge.net \
    /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.