diff options
author | Szabolcs Nagy <nsz@port70.net> | 2014-08-13 16:47:51 +0200 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2014-08-13 16:47:51 +0200 |
commit | b04971d91a46d34b5e643ee2e8164171b6247216 (patch) | |
tree | 9164bed9b2fc7f88c50dfd5895d5c92bf8f4b9fa /src/locale | |
parent | 4fe57cad709fdfb377060ab2bac4b7b187956282 (diff) | |
download | musl-b04971d91a46d34b5e643ee2e8164171b6247216.tar.gz musl-b04971d91a46d34b5e643ee2e8164171b6247216.tar.bz2 musl-b04971d91a46d34b5e643ee2e8164171b6247216.tar.xz musl-b04971d91a46d34b5e643ee2e8164171b6247216.zip |
add inline isspace in ctype.h as an optimization
isspace can be a bottleneck in a simple parser, inlining it
gives slightly smaller and faster code
src/locale/pleval.o already had this optimization, the size
change for other libc functions for i386 is
src/internal/intscan.o 2134 2118 -16
src/locale/dcngettext.o 1562 1552 -10
src/network/res_msend.o 1961 1940 -21
src/network/lookup_name.o 2627 2608 -19
src/network/getnameinfo.o 1814 1811 -3
src/network/lookup_serv.o 643 624 -19
src/stdio/vfscanf.o 2675 2663 -12
src/stdlib/atoll.o 117 107 -10
src/stdlib/atoi.o 95 91 -4
src/stdlib/atol.o 95 91 -4
src/time/strptime.o 1515 1503 -12
(TOTALS) 432451 432321 -130
Diffstat (limited to 'src/locale')
-rw-r--r-- | src/locale/pleval.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/locale/pleval.c b/src/locale/pleval.c index 961dabc0..d60058da 100644 --- a/src/locale/pleval.c +++ b/src/locale/pleval.c @@ -28,14 +28,6 @@ struct st { int op; }; -/* TODO: this should go into ctypes.h */ -#undef isspace -#define isspace(a) __isspace(a) -static __inline int __isspace(int _c) -{ - return _c == ' ' || (unsigned)_c-'\t' < 5; -} - static const char *skipspace(const char *s) { while (isspace(*s)) s++; |