[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loading souce Elisp faster
From: |
Richard Stallman |
Subject: |
Re: Loading souce Elisp faster |
Date: |
Wed, 27 Feb 2013 09:28:09 -0500 |
This change in decode_coding_utf_8 should make it considerably faster
in the usual case where few characters need conversion.
We might still want to do something else for Elisp files,
but this is worth doing anyway since it will help for other files too.
I have not installed it myself since I have not tested it enough.
It might be worth making a similar improvement for other cases,
such as ! multibytep && ! eol_dos or multibytep && eol_dos.
=== modified file 'src/coding.c'
*** src/coding.c 2013-01-25 04:41:39 +0000
--- src/coding.c 2013-02-27 11:38:18 +0000
***************
*** 1294,1299 ****
--- 1294,1338 ----
break;
}
+ /* In the simple case, rapidly handle ordinary characters */
+ if (multibytep && ! eol_dos
+ && charbuf < charbuf_end - 6 && src < src_end - 6)
+ {
+ while (charbuf < charbuf_end - 6 && src < src_end - 6)
+ {
+ c1 = *src;
+ if (c1 & 0x80)
+ break;
+ src++;
+ consumed_chars++;
+ *charbuf++ = c1;
+
+ c1 = *src;
+ if (c1 & 0x80)
+ break;
+ src++;
+ consumed_chars++;
+ *charbuf++ = c1;
+
+ c1 = *src;
+ if (c1 & 0x80)
+ break;
+ src++;
+ consumed_chars++;
+ *charbuf++ = c1;
+
+ c1 = *src;
+ if (c1 & 0x80)
+ break;
+ src++;
+ consumed_chars++;
+ *charbuf++ = c1;
+ }
+ /* If we handled at least one character, restart the main loop. */
+ if (src != src_base)
+ continue;
+ }
+
if (byte_after_cr >= 0)
c1 = byte_after_cr, byte_after_cr = -1;
else
--
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
Use Ekiga or an ordinary phone call
- Re: Loading souce Elisp faster, (continued)
- Re: Loading souce Elisp faster, Leo Liu, 2013/02/25
- Re: Loading souce Elisp faster, Ted Zlatanov, 2013/02/25
- Re: Loading souce Elisp faster, Kenichi Handa, 2013/02/26
- Re: Loading souce Elisp faster, Stefan Monnier, 2013/02/27
- RE: Loading souce Elisp faster, Drew Adams, 2013/02/27
- Re: Loading souce Elisp faster, Werner LEMBERG, 2013/02/27
- Re: Loading souce Elisp faster,
Richard Stallman <=
- Re: Loading souce Elisp faster, Kenichi Handa, 2013/02/28
- Re: Loading souce Elisp faster, Richard Stallman, 2013/02/28
Re: Loading souce Elisp faster, Achim Gratz, 2013/02/25
Re: Loading souce Elisp faster, Richard Stallman, 2013/02/25
- Re: Loading souce Elisp faster, Stefan Monnier, 2013/02/25
- RE: Loading souce Elisp faster, Drew Adams, 2013/02/25
- Re: Loading souce Elisp faster, Stefan Monnier, 2013/02/25
- Re: Loading souce Elisp faster, Lennart Borgman, 2013/02/25
- Re: Loading souce Elisp faster, Stefan Monnier, 2013/02/25
- Re: Loading souce Elisp faster, Lennart Borgman, 2013/02/25