bc: optimize pushing zero bytes to vectors
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 5 Dec 2018 15:55:08 +0000 (16:55 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 5 Dec 2018 15:55:08 +0000 (16:55 +0100)
commit08c033c406e2ef1ef9209b1ea09864928e2158ab
tree0e4876cf026f4b24c35c26fd3e9c20866b3be2f6
parent0409ad36a11ad51e47813b65a97e6ad68f42d381
bc: optimize pushing zero bytes to vectors

function                                             old     new   delta
bc_vec_pushZeroByte                                    -      10     +10
bc_vm_run                                           1919    1917      -2
bc_vec_string                                         61      59      -2
bc_vec_concat                                         68      66      -2
bc_parse_create                                      170     168      -2
bc_lex_number                                        298     296      -2
dc_lex_token                                         691     687      -4
bc_read_line                                         314     303     -11
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/7 up/down: 10/-25)            Total: -15 bytes

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