diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-06-01 16:03:12 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-06-01 16:06:38 -0700 |
commit | 178d0cb5f530e6d7eb36eb9987ff405c854ccdb3 (patch) | |
tree | d5c8c63dc97ed4635b354bb16803cbfd1d953470 /admin/merge-gnulib | |
parent | 53247108411a1e9d1aa5352c231fa049f3f918aa (diff) | |
download | emacs-178d0cb5f530e6d7eb36eb9987ff405c854ccdb3.tar.gz |
Improve performance by avoiding strtoumax
This made (string-to-number "10") 20% faster on my old desktop,
an AMD Phenom II X4 910e running Fedora 25 x86-64.
* admin/merge-gnulib (GNULIB_MODULES): Remove strtoumax.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/strtoul.c, lib/strtoull.c, lib/strtoumax.c, m4/strtoull.m4:
* m4/strtoumax.m4: Remove.
* src/editfns.c (str2num): New function.
(styled_format): Use it instead of strtoumax. Use ptrdiff_t
instead of uintmax_t. Check for integer overflow.
* src/lread.c (LEAD_INT, DOT_CHAR, TRAIL_INT, E_EXP):
Move to private scope and make them enums.
(string_to_number): Compute integer value directly during
first pass instead of revisiting it with strtoumax later.
Diffstat (limited to 'admin/merge-gnulib')
-rwxr-xr-x | admin/merge-gnulib | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 45e4a788a35..e5fb0f59fb3 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -38,7 +38,7 @@ GNULIB_MODULES=' manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time std-gnu11 stdalign stddef stdio - stpcpy strftime strtoimax strtoumax symlink sys_stat + stpcpy strftime strtoimax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub update-copyright utimens vla warnings |