summaryrefslogtreecommitdiff
path: root/src/locale/pleval.c
AgeCommit message (Collapse)AuthorLines
2014-08-13add inline isspace in ctype.h as an optimizationSzabolcs Nagy-8/+0
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
2014-07-30plural rule evaluator rewrite for dcngettextSzabolcs Nagy-128/+106
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
2014-07-29tweaks to plural rules evaluatorSzabolcs Nagy-54/+44
const parsing, depth accounting and failure handling was changed a bit so the generated code is slightly smaller.
2014-07-28implement non-default plural rules for ngettext translationsRich Felker-0/+197
the new code in dcngettext was written by me, and the expression evaluator by Szabolcs Nagy (nsz).