History log of /seL4-camkes-master/projects/musllibc/src/locale/pleval.c
Revision Date Author Comments
# b04971d9 13-Aug-2014 Szabolcs Nagy <nsz@port70.net>

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


# 6527b03d 30-Jul-2014 Szabolcs Nagy <nsz@port70.net>

plural rule evaluator rewrite for dcngettext

using an operator precedence parser the code size
became smaller and it is only slower by about %10

size of old vs new pleval.o on different archs:
(with inlined isspace added to pleval.c for now)

old:
text data bss dec hex filename
828 0 0 828 33c pl.i386.o
1152 0 0 1152 480 pl.arm.o
1704 0 0 1704 6a8 pl.mips.o
1328 0 0 1328 530 pl.ppc.o
992 0 0 992 3e0 pl.x64.o
new:
text data bss dec hex filename
693 0 0 693 2b5 pl.i386.o
972 0 0 972 3cc pl.arm.o
1276 0 0 1276 4fc pl.mips.o
1087 0 0 1087 43f pl.ppc.o
846 0 0 846 34e pl.x64.o


# a126188f 29-Jul-2014 Szabolcs Nagy <nsz@port70.net>

tweaks to plural rules evaluator

const parsing, depth accounting and failure handling was changed
a bit so the generated code is slightly smaller.


# 73d2a3bf 28-Jul-2014 Rich Felker <dalias@aerifal.cx>

implement non-default plural rules for ngettext translations

the new code in dcngettext was written by me, and the expression
evaluator by Szabolcs Nagy (nsz).