From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: Ligature support
Date: Sat, 06 Nov 2021 10:32:33 +0200 [thread overview]
Message-ID: <83sfw9bs66.fsf@gnu.org> (raw)
In-Reply-To: <87bl2ygq8u.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 06 Nov 2021 00:02:57 +0100)
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Sat, 06 Nov 2021 00:02:57 +0100
>
> (dolist (c (append (number-sequence ?A ?Z)
> (number-sequence ?a ?z)))
> (aset composition-function-table
> c
> (list (vector (concat (string c) "[^ \n\t]+") 0 #'font-shape-gstring))))
>
> So that fixes the kerning (this is with the proportional Deja Vu font).
> And with that, scrolling through xdisp.c is 30% slower.
30% slowdown is already a bad sign. However, scrolling through
xdisp.c is not representative enough, since most of that is source
code which will not ligate given the above rules. If you want to make
a realistic comparison for xdisp.c, you need ligature rules for
program symbols, not for ASCII letters.
I tried the above with the King James Bible text, which you can
download from here:
http://corpus.canterbury.ac.nz/resources/large.tar.gz
It's a 30K line, 4MB file. With that, running the scrolling benchmark
whose code is shown below produces:
without ligatures: 30.4 sec and 28 GC cycles
with ligatures: 91.1 sec and 91 GC cycles
(This is an unoptimized build of Emacs 29; with optimized builds
and/or faster CPUs you will see shorter times, but the ratio should be
similar.)
Are we willing to make our redisplay 3 times slower with plain ASCII
text?
I think the current design of character compositions in Emacs is
inappropriate for sending all the text via the shaping engine. It was
designed on the assumption that composed characters will be rare in
"normal" usage, and will only be massive in some specific scripts
where this is unavoidable, like Arabic and Hangul. If we want to call
the shaper for everything we display, we should radically change how
this is designed and implemented.
Here's the function I used for the benchmark:
(defun scroll-up-benchmark ()
(interactive)
(let ((oldgc gcs-done)
(oldtime (float-time)))
(condition-case nil (while t (scroll-up) (redisplay))
(error (message "GCs: %d Elapsed time: %f seconds"
(- gcs-done oldgc) (- (float-time) oldtime))))))
next prev parent reply other threads:[~2021-11-06 8:32 UTC|newest]
Thread overview: 342+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 18:32 Entering emojis Lars Ingebrigtsen
2021-10-25 18:45 ` Eli Zaretskii
2021-10-25 19:21 ` Lars Ingebrigtsen
2021-10-25 19:26 ` Eli Zaretskii
2021-10-25 19:36 ` Lars Ingebrigtsen
2021-10-25 19:40 ` Eli Zaretskii
2021-10-25 19:49 ` Lars Ingebrigtsen
2021-10-25 20:14 ` Gregory Heytings
2021-10-25 20:49 ` Lars Ingebrigtsen
2021-10-26 2:01 ` Howard Melman
2021-10-26 2:29 ` Eli Zaretskii
2021-10-26 3:38 ` Lars Ingebrigtsen
2021-10-26 9:10 ` Stefan Kangas
2021-10-26 11:50 ` Lars Ingebrigtsen
2021-10-26 14:35 ` Lars Ingebrigtsen
2021-10-27 12:18 ` Lars Ingebrigtsen
2021-10-27 13:49 ` Lars Ingebrigtsen
2021-10-26 15:46 ` Stefan Kangas
2021-10-26 16:09 ` Lars Ingebrigtsen
2021-10-26 16:36 ` Lars Ingebrigtsen
2021-10-26 16:42 ` Lars Ingebrigtsen
2021-10-26 16:52 ` Eli Zaretskii
2021-10-26 17:36 ` Lars Ingebrigtsen
2021-10-26 16:49 ` Eli Zaretskii
2021-10-26 17:09 ` Robert Pluim
2021-10-26 17:14 ` Eli Zaretskii
2021-10-26 17:33 ` Lars Ingebrigtsen
2021-10-26 17:39 ` Eli Zaretskii
2021-10-27 12:44 ` Lars Ingebrigtsen
2021-10-26 17:43 ` Lars Ingebrigtsen
2021-10-26 17:54 ` Gregory Heytings
2021-10-26 18:14 ` Lars Ingebrigtsen
2021-10-26 17:55 ` Robert Pluim
2021-10-26 18:08 ` Lars Ingebrigtsen
2021-10-26 17:46 ` Robert Pluim
2021-10-26 17:58 ` Lars Ingebrigtsen
2021-10-26 18:07 ` Robert Pluim
2021-10-26 18:14 ` Lars Ingebrigtsen
2021-10-26 18:18 ` Robert Pluim
2021-10-26 18:24 ` Lars Ingebrigtsen
2021-10-26 19:18 ` describe-char on emoji sequences Lars Ingebrigtsen
2021-10-26 19:28 ` Eli Zaretskii
2021-10-26 19:42 ` Lars Ingebrigtsen
2021-10-27 13:35 ` James Cloos
2021-10-27 13:43 ` Lars Ingebrigtsen
2021-10-27 15:07 ` Andreas Schwab
2021-10-27 15:15 ` Lars Ingebrigtsen
2021-10-27 15:59 ` Robert Pluim
2021-10-27 16:11 ` Andreas Schwab
2021-10-27 16:05 ` Eli Zaretskii
2021-10-27 16:12 ` Andreas Schwab
2021-10-27 16:23 ` Lars Ingebrigtsen
2021-10-27 16:34 ` Andreas Schwab
2021-10-27 16:36 ` Eli Zaretskii
2021-10-27 16:43 ` Andreas Schwab
2021-10-27 17:02 ` Eli Zaretskii
2021-10-27 17:32 ` Robert Pluim
2021-10-27 19:40 ` Andreas Schwab
2021-10-27 19:48 ` Gregory Heytings
2021-10-27 16:26 ` Eli Zaretskii
2021-10-27 16:36 ` Andreas Schwab
2021-10-27 17:08 ` James Cloos
2021-10-27 17:13 ` Eli Zaretskii
2021-10-27 17:36 ` Robert Pluim
2021-10-27 18:23 ` Eli Zaretskii
2021-10-28 7:02 ` James Cloos
2021-10-28 7:46 ` Robert Pluim
2021-10-28 9:34 ` Eli Zaretskii
2021-10-28 9:39 ` Robert Pluim
2021-10-28 9:16 ` Eli Zaretskii
2021-10-28 19:24 ` James Cloos
2021-10-28 19:34 ` Eli Zaretskii
2021-10-28 12:21 ` Richard Stallman
2021-10-28 12:23 ` Lars Ingebrigtsen
2021-10-27 13:49 ` Eli Zaretskii
2021-10-27 13:57 ` Eli Zaretskii
2021-10-27 14:25 ` Lars Ingebrigtsen
2021-10-27 16:30 ` Eli Zaretskii
2021-10-27 17:30 ` T.V Raman
2021-10-28 14:35 ` Lars Ingebrigtsen
2021-10-28 23:17 ` Lars Ingebrigtsen
2021-10-26 16:45 ` Entering emojis Stefan Kangas
2021-10-26 17:34 ` Lars Ingebrigtsen
2021-10-26 18:39 ` William Xu
2021-10-26 19:35 ` Stefan Monnier
2021-10-26 20:41 ` Broken Stefan Kangas
2021-10-26 21:12 ` Entering emojis Stefan Kangas
2021-10-27 1:38 ` Howard Melman
2021-10-27 8:27 ` Mattias Engdegård
2021-10-27 8:51 ` Andreas Schwab
2021-10-27 14:14 ` T.V Raman
2021-10-27 15:14 ` Gregory Heytings
2021-10-27 17:20 ` Eli Zaretskii
2021-10-27 16:01 ` Eli Zaretskii
2021-10-27 17:50 ` Gregory Heytings
2021-10-27 18:27 ` Eli Zaretskii
2021-10-27 18:38 ` Gregory Heytings
2021-10-27 18:41 ` Eli Zaretskii
2021-10-27 18:56 ` Gregory Heytings
2021-10-27 19:15 ` Eli Zaretskii
2021-10-27 19:20 ` Gregory Heytings
2021-10-28 5:56 ` Eli Zaretskii
2021-10-28 6:50 ` Gregory Heytings
2021-10-28 9:11 ` Eli Zaretskii
2021-10-28 9:37 ` Gregory Heytings
2021-10-28 9:39 ` Gregory Heytings
2021-10-28 10:00 ` Eli Zaretskii
2021-10-28 10:05 ` Gregory Heytings
2021-10-28 10:25 ` Gregory Heytings
2021-10-28 10:33 ` Eli Zaretskii
2021-10-28 11:20 ` Gregory Heytings
2021-10-28 13:26 ` Eli Zaretskii
2021-10-28 13:55 ` Gregory Heytings
2021-10-28 16:27 ` Eli Zaretskii
2021-10-28 17:06 ` Gregory Heytings
2021-10-28 17:37 ` Eli Zaretskii
2021-10-28 21:10 ` Gregory Heytings
2021-10-29 7:51 ` Eli Zaretskii
2021-10-29 10:32 ` Gregory Heytings
2021-10-29 10:54 ` Eli Zaretskii
2021-10-28 21:40 ` Lars Ingebrigtsen
2021-10-29 7:31 ` Eli Zaretskii
2021-10-29 12:51 ` Lars Ingebrigtsen
2021-10-29 13:31 ` Eli Zaretskii
2021-11-05 5:04 ` Lars Ingebrigtsen
2021-11-05 7:56 ` Ligature support (was: Entering emojis) Eli Zaretskii
2021-11-05 13:42 ` Ligature support Lars Ingebrigtsen
2021-11-05 14:33 ` Eli Zaretskii
2021-11-05 14:38 ` Lars Ingebrigtsen
2021-11-05 15:14 ` Eli Zaretskii
2021-11-05 15:20 ` Lars Ingebrigtsen
2021-11-05 15:26 ` Lars Ingebrigtsen
2021-11-05 15:40 ` Lars Ingebrigtsen
2021-11-05 16:35 ` Eli Zaretskii
2021-11-05 15:26 ` Eli Zaretskii
2021-11-05 15:37 ` Lars Ingebrigtsen
2021-11-05 15:56 ` Lars Ingebrigtsen
2021-11-05 16:39 ` Eli Zaretskii
2021-11-05 16:34 ` Eli Zaretskii
2021-11-05 16:45 ` Lars Ingebrigtsen
2021-11-05 17:05 ` Yuri Khan
2021-11-05 17:16 ` Lars Ingebrigtsen
2021-11-05 18:54 ` Eli Zaretskii
2021-11-05 22:17 ` Lars Ingebrigtsen
2021-11-06 7:04 ` Eli Zaretskii
2021-11-06 18:02 ` Lars Ingebrigtsen
2021-11-05 20:09 ` Yuri Khan
2021-11-05 22:20 ` Lars Ingebrigtsen
2021-11-06 9:01 ` Yuri Khan
2021-11-05 17:13 ` tomas
2021-11-05 19:14 ` Eli Zaretskii
2021-11-05 19:52 ` tomas
2021-11-05 20:16 ` Werner LEMBERG
2021-11-05 20:18 ` tomas
2021-11-05 20:35 ` Eli Zaretskii
2021-11-05 20:30 ` Eli Zaretskii
2021-11-06 9:16 ` tomas
2021-11-06 9:49 ` Eli Zaretskii
2021-11-05 20:43 ` Stefan Kangas
2021-11-05 20:49 ` Eli Zaretskii
2021-11-05 17:18 ` Lars Ingebrigtsen
2021-11-05 18:55 ` Eli Zaretskii
2021-11-05 19:11 ` Eli Zaretskii
2021-11-05 22:38 ` Lars Ingebrigtsen
2021-11-05 22:50 ` Lars Ingebrigtsen
2021-11-05 23:02 ` Lars Ingebrigtsen
2021-11-06 8:32 ` Eli Zaretskii [this message]
2021-11-06 18:08 ` Lars Ingebrigtsen
2021-11-06 18:34 ` Eli Zaretskii
2021-11-06 5:23 ` Lars Ingebrigtsen
2021-11-06 8:40 ` Eli Zaretskii
2021-11-12 20:28 ` chad
2021-11-15 4:51 ` Richard Stallman
2021-11-15 6:19 ` Stefan Kangas
2021-11-18 3:50 ` Richard Stallman
2021-11-15 12:52 ` Eli Zaretskii
2021-11-06 7:12 ` Eli Zaretskii
2021-11-06 18:05 ` Lars Ingebrigtsen
2021-11-06 18:30 ` Eli Zaretskii
2021-11-06 13:25 ` Benjamin Riefenstahl
2021-11-06 13:34 ` Eli Zaretskii
2021-11-06 17:03 ` Benjamin Riefenstahl
2021-11-06 17:33 ` Eli Zaretskii
2021-10-27 19:23 ` Entering emojis Gregory Heytings
2021-10-28 5:58 ` Eli Zaretskii
2021-10-27 14:16 ` T.V Raman
2021-10-27 12:09 ` Eli Zaretskii
2021-10-27 12:27 ` Robert Pluim
2021-10-27 11:48 ` Eli Zaretskii
2021-10-27 12:36 ` Robert Pluim
2021-10-27 13:07 ` Robert Pluim
2021-10-27 13:09 ` Lars Ingebrigtsen
2021-10-27 13:26 ` Robert Pluim
2021-10-27 13:50 ` Eli Zaretskii
2021-11-08 19:52 ` chad
2021-11-08 19:58 ` Eli Zaretskii
2021-10-27 13:34 ` Eli Zaretskii
2021-10-27 15:12 ` Robert Pluim
2021-10-27 16:08 ` Eli Zaretskii
2021-10-27 17:00 ` Robert Pluim
2021-10-27 13:22 ` Eli Zaretskii
2021-10-27 13:28 ` Robert Pluim
2021-10-27 14:06 ` Stefan Kangas
2021-10-27 14:15 ` Eli Zaretskii
2021-10-27 14:22 ` Stefan Kangas
2021-10-27 15:34 ` Michael Albinus
2021-11-02 23:36 ` Jonas Bernoulli
2021-11-04 6:27 ` Lars Ingebrigtsen
2021-11-04 15:12 ` Jonas Bernoulli
2021-11-04 17:18 ` Lars Ingebrigtsen
2021-11-04 18:34 ` T.V Raman
2021-10-25 19:42 ` Gregory Heytings
2021-10-25 20:10 ` Lars Ingebrigtsen
2021-10-25 20:18 ` Lars Ingebrigtsen
2021-10-25 20:31 ` Lars Ingebrigtsen
2021-10-25 20:36 ` Matthias Meulien
2021-10-26 2:36 ` Eli Zaretskii
2021-10-25 20:54 ` T.V Raman
2021-10-26 21:20 ` Lars Ingebrigtsen
2021-10-26 21:43 ` Stefan Kangas
2021-10-27 12:45 ` Lars Ingebrigtsen
2021-10-27 14:22 ` Stefan Kangas
2021-10-27 12:01 ` Eli Zaretskii
2021-10-27 12:28 ` Lars Ingebrigtsen
2021-10-27 13:19 ` Eli Zaretskii
2021-11-02 23:40 ` Jonas Bernoulli
2021-10-27 14:38 ` Stefan Kangas
2021-10-27 15:40 ` Lars Ingebrigtsen
2021-10-27 17:11 ` Move shorthands.el to lisp/emacs-lisp/? Stefan Kangas
2021-10-28 21:28 ` Lars Ingebrigtsen
2021-10-29 5:31 ` Eli Zaretskii
2021-10-29 9:45 ` Yuri Khan
2021-10-29 10:10 ` Eli Zaretskii
2021-10-29 10:31 ` Yuri Khan
2021-10-29 10:41 ` Eli Zaretskii
2021-10-29 10:51 ` Dmitry Gutov
2021-10-29 12:37 ` Lars Ingebrigtsen
2021-10-27 15:52 ` Entering emojis Eli Zaretskii
2021-10-27 16:27 ` Stefan Kangas
2021-10-27 16:37 ` Eli Zaretskii
2021-10-27 15:56 ` Stefan Monnier
2021-10-27 16:06 ` Lars Ingebrigtsen
2021-10-27 16:20 ` Eli Zaretskii
2021-10-27 16:27 ` Stefan Kangas
2021-10-28 21:27 ` Lars Ingebrigtsen
2021-11-02 23:48 ` Jonas Bernoulli
2021-11-03 1:50 ` T.V Raman
2021-11-04 6:28 ` Lars Ingebrigtsen
2021-10-28 14:14 ` Kévin Le Gouguec
2021-10-28 14:16 ` Lars Ingebrigtsen
2021-10-28 14:31 ` Lars Ingebrigtsen
2021-10-28 14:56 ` Kévin Le Gouguec
2021-10-28 14:59 ` Lars Ingebrigtsen
2021-10-28 15:27 ` Kévin Le Gouguec
2021-10-28 21:43 ` Lars Ingebrigtsen
2021-10-29 9:32 ` Kévin Le Gouguec
2021-10-29 13:03 ` Lars Ingebrigtsen
2021-10-29 15:30 ` Kévin Le Gouguec
2021-10-29 16:01 ` Lars Ingebrigtsen
2021-10-29 16:45 ` Kévin Le Gouguec
2021-10-29 17:18 ` Lars Ingebrigtsen
2021-11-03 0:08 ` Jonas Bernoulli
2021-11-03 16:15 ` Jonas Bernoulli
2021-10-27 17:25 ` Lars Ingebrigtsen
2021-10-28 9:18 ` Lars Ingebrigtsen
2021-10-28 10:33 ` Stefan Kangas
2021-10-28 11:08 ` Lars Ingebrigtsen
2021-10-28 11:19 ` Lars Ingebrigtsen
2021-10-28 12:54 ` Eli Zaretskii
2021-10-28 12:56 ` Lars Ingebrigtsen
2021-10-28 13:32 ` Eli Zaretskii
2021-10-28 13:54 ` Lars Ingebrigtsen
2021-10-28 15:57 ` Eli Zaretskii
2021-10-28 21:49 ` Lars Ingebrigtsen
2021-10-29 5:45 ` Eli Zaretskii
2021-10-29 12:46 ` Lars Ingebrigtsen
2021-10-29 13:30 ` Eli Zaretskii
2021-10-29 13:38 ` Lars Ingebrigtsen
2021-10-29 13:55 ` Eli Zaretskii
2021-10-29 14:12 ` Lars Ingebrigtsen
2021-10-29 14:30 ` Lars Ingebrigtsen
2021-10-29 14:45 ` Lars Ingebrigtsen
2021-10-29 14:53 ` Lars Ingebrigtsen
2021-10-29 16:02 ` Eli Zaretskii
2021-10-29 16:39 ` Lars Ingebrigtsen
2021-10-29 16:01 ` Eli Zaretskii
2021-10-29 16:34 ` Lars Ingebrigtsen
2021-10-29 18:06 ` Eli Zaretskii
2021-10-29 18:23 ` Lars Ingebrigtsen
2021-10-29 19:46 ` Eli Zaretskii
2021-10-29 20:43 ` Lars Ingebrigtsen
2021-10-29 20:57 ` Lars Ingebrigtsen
2021-10-29 21:09 ` Lars Ingebrigtsen
2021-10-29 21:21 ` Lars Ingebrigtsen
2021-10-30 6:08 ` Eli Zaretskii
2021-10-30 7:06 ` Andreas Schwab
2021-11-03 18:56 ` Eli Zaretskii
2021-10-30 12:17 ` Lars Ingebrigtsen
2021-10-28 13:56 ` Robert Pluim
2021-10-28 20:44 ` Stefan Kangas
2021-10-28 21:51 ` Lars Ingebrigtsen
2021-10-28 22:34 ` Stefan Kangas
2021-10-28 22:39 ` Lars Ingebrigtsen
2021-11-03 0:35 ` Jonas Bernoulli
2021-10-28 13:30 ` Eli Zaretskii
2021-10-28 23:37 ` Stefan Kangas
2021-10-28 23:48 ` Lars Ingebrigtsen
2021-10-29 6:10 ` Eli Zaretskii
2021-10-29 6:09 ` Eli Zaretskii
2021-10-29 14:43 ` Stefan Kangas
2021-10-29 16:06 ` Eli Zaretskii
2021-10-29 17:01 ` Stefan Kangas
2022-01-29 10:23 ` Eli Zaretskii
2021-10-29 17:41 ` Daniel Martín
2021-10-29 21:46 ` Lars Ingebrigtsen
2021-10-29 22:16 ` Lars Ingebrigtsen
2021-10-30 6:19 ` Eli Zaretskii
2021-10-30 6:36 ` Eli Zaretskii
2021-10-30 12:25 ` Lars Ingebrigtsen
2021-10-30 12:30 ` Eli Zaretskii
2021-10-30 12:34 ` Lars Ingebrigtsen
2021-10-30 12:49 ` Eli Zaretskii
2021-10-30 12:20 ` Lars Ingebrigtsen
2021-10-30 6:22 ` Eli Zaretskii
2021-10-30 14:26 ` Howard Melman
2021-10-28 14:19 ` T.V Raman
2021-10-28 14:33 ` Lars Ingebrigtsen
2021-10-28 16:04 ` Eli Zaretskii
2021-11-01 19:47 ` Jonas Bernoulli
2021-11-02 2:06 ` Lars Ingebrigtsen
2021-11-03 1:27 ` Jonas Bernoulli
2021-11-03 2:07 ` Reading multiple files (was: Entering emojis) Stefan Monnier
2021-11-03 16:21 ` Jonas Bernoulli
2021-11-04 17:31 ` Entering emojis Lars Ingebrigtsen
2021-11-13 19:43 ` Problem with some new emoji in Emacs Jean Louis
2021-11-13 20:16 ` Eli Zaretskii
2021-11-13 20:49 ` Jean Louis
2021-11-14 6:35 ` Eli Zaretskii
2021-11-14 7:50 ` Jean Louis
2021-11-13 20:37 ` Stefan Monnier
2021-11-13 20:53 ` Jean Louis
2021-11-13 21:14 ` Jean Louis
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sfw9bs66.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).