parse_config: use getline. BIG speedup with glibc (~40%).
authorTimo Teras <timo.teras@iki.fi>
Mon, 20 Jun 2011 07:49:56 +0000 (09:49 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 20 Jun 2011 07:49:56 +0000 (09:49 +0200)
commitadcabf3235a13e77a32ff2a7b7cf80be8ee3dfe3
tree5bb62bad050d86c1b711a19a1ea9e7ae525b9311
parente12e0acb92329f95a77121f489b491d84b6a2c33
parse_config: use getline. BIG speedup with glibc (~40%).

function                                             old     new   delta
config_read                                          559     604     +45
getline                                                -      23     +23
config_close                                          29      49     +20
find_pair                                            169     187     +18
showmode                                             330     338      +8
hash_find                                            233     234      +1
builtin_umask                                        133     132      -1
lzo1x_optimize                                      1434    1429      -5
test_main                                            253     247      -6
buffer_fill_and_print                                196     179     -17
create_J                                            1849    1826     -23
config_free_data                                      37       -     -37
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 5/5 up/down: 138/-89)            Total: 26 bytes

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
libbb/parse_config.c