hush: faster/smaller code to check for presense of multiple chars in string
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 17 Jul 2018 12:33:19 +0000 (14:33 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 17 Jul 2018 12:33:19 +0000 (14:33 +0200)
commit0d2e0de42bab54c31ba37f1c6fd10dcdc7008ccf
tree9c84b82f6bb324a685ac8270aa44230121e7c7bb
parentb762c784caa78877a9949224af425e52db237beb
hush: faster/smaller code to check for presense of multiple chars in string

Go over the string only once.

function                                             old     new   delta
encode_then_expand_string                            126     105     -21
encode_then_expand_vararg                            443     399     -44
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-65)             Total: -65 bytes

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