bc: use more compact parsing data structures
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 7 Dec 2018 11:57:32 +0000 (12:57 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 7 Dec 2018 11:57:32 +0000 (12:57 +0100)
commit18c6b54f820923549135724fee6cf66c26929b07
tree60030a7234fd7e5d6eed7e1093a263bfe1c55e09
parentb9c321d6d94fc8bbae5fe657e141cbd9f2397037
bc: use more compact parsing data structures

function                                             old     new   delta
dc_lex_token                                         697     701      +4
bc_parse_next_rel                                     20       -     -20
bc_parse_next_read                                    20       -     -20
bc_parse_next_print                                   20       -     -20
bc_parse_next_param                                   20       -     -20
bc_parse_next_for                                     20       -     -20
bc_parse_next_expr                                    20       -     -20
bc_parse_next_elem                                    20       -     -20
common_parse_expr                                     62      40     -22
bc_parse_expr                                         49      24     -25
dc_lex_regs                                           52      13     -39
bc_parse_name                                        581     539     -42
bc_parse_expr_empty_ok                              2157    2108     -49
dc_parse_insts                                       332      83    -249
dc_lex_tokens                                        364      91    -273
bc_parse_stmt                                       2261    1868    -393
------------------------------------------------------------------------------
(add/remove: 0/7 grow/shrink: 1/8 up/down: 4/-1232)         Total: -1228 bytes
   text    data     bss     dec     hex filename
 987037     485    7296  994818   f2e02 busybox_old
 985814     485    7296  993595   f293b busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c