diff options
author | Denys Vlasenko | 2021-06-29 19:07:36 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-06-29 19:07:36 +0200 |
commit | 3aff3b9cb81c1f574aaafaf3981e755c6639e2bc (patch) | |
tree | 1f67a3cc384ab9e7e4c9e030a469e6b0b9bb15dc /shell/hush_test | |
parent | b3c91a127f8baecee0265ba92898ae1e718bdb31 (diff) | |
download | busybox-3aff3b9cb81c1f574aaafaf3981e755c6639e2bc.zip busybox-3aff3b9cb81c1f574aaafaf3981e755c6639e2bc.tar.gz |
awk: assorted optimizations
hash_find(): do not caclculate hash twice. Do not divide - can use
cheap multiply-by-8 shift.
nextword(): do not repeatedly increment in-memory value, do it in register,
then store final result.
hashwalk_init(): do not strlen() twice.
function old new delta
hash_search3 - 49 +49
hash_find 259 281 +22
nextword 19 16 -3
evaluate 3141 3137 -4
hash_search 54 28 -26
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/3 up/down: 71/-33) Total: 38 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
0 files changed, 0 insertions, 0 deletions