diff options
author | Paul Eggert <eggert@Penguin.CS.UCLA.EDU> | 2019-06-08 23:31:28 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-06-08 23:32:23 -0700 |
commit | 5abaea334cf4c0e004fca2b8b272e091eb5b5444 (patch) | |
tree | 315f3f1773ffaa11658115c5d9b920713079fd2a /lisp/textmodes/text-mode.el | |
parent | 1043cd30acffcc0b61da4a80dcf3f8a5ac459267 (diff) | |
download | emacs-5abaea334cf4c0e004fca2b8b272e091eb5b5444.tar.gz emacs-5abaea334cf4c0e004fca2b8b272e091eb5b5444.tar.bz2 emacs-5abaea334cf4c0e004fca2b8b272e091eb5b5444.zip |
Tune base64 decoding
This improves performance of base64-decode-region by about 7.5% on
my platform, and gets rid of some macros.
* src/fns.c (IS_ASCII, IS_BASE64, IS_BASE64_IGNORABLE)
(READ_QUADRUPLET_BYTE): Remove.
(base64_value_to_char, base64_char_to_value):
Now an array of two arrays. All uses changed.
(base64url_value_to_char, base64url_char_to_value):
Remove. All uses changed to the other array.
(base64_char_to_value): Entries are now of type signed char, not
short, since we can assume C99. Use C99 initializers; this is
clearer and caters to the (theoretical) possibility of systems
that do not use ASCII or do not have 8-bit bytes. Allow any index
in the range 0..UCHAR_MAX instead of limiting it to 0..127, so
that uses need not check for in-range indexes. Also record
padding chars. All uses changed.
(base64_decode_1): Always store number of chars in *NCHARS_RETURN,
for simplicity. All callers changed. Speed up the byte-fetching.
Diffstat (limited to 'lisp/textmodes/text-mode.el')
0 files changed, 0 insertions, 0 deletions