Age | Commit message (Collapse) | Author |
|
function old new delta
fiddle_sum 8 - -8
diffreg 2717 2690 -27
prepare 334 284 -50
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/2 up/down: 0/-85) Total: -85 bytes
s/ATTRIBUTE_ALWAYS_INLINE/ALWAYS_INLINE/g
|
|
|
|
(8k of shell line edit buffer is an overkill)
# make ARCH=i386 bloatcheck
function old new delta
read_line_input 3933 3967 +34
ifaddrlist 348 345 -3
do_loadfont 208 191 -17
edit_file 840 819 -21
.rodata 129112 129080 -32
uncompress 1305 1268 -37
loadfont_main 566 495 -71
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 34/-181) Total: -147 bytes
|
|
by minimizing data offsets
function old new delta
parse_expr 752 782 +30
syntax_error 23 26 +3
nvfree 151 154 +3
nvalloc 172 175 +3
fsrealloc 111 114 +3
chain_node 99 102 +3
chain_loop 121 124 +3
chain_group 628 631 +3
awk_main 1002 1005 +3
awk_exit 99 102 +3
parse_program 308 310 +2
split_f0 172 170 -2
awk_split 510 507 -3
getvar_s 108 102 -6
awk_sub 643 637 -6
awk_getline 706 700 -6
next_token 943 927 -16
handle_special 470 446 -24
next_input_file 252 213 -39
evaluate 6703 6633 -70
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/9 up/down: 59/-172) Total: -113 bytes
# size */*/awk.o
text data bss dec hex filename
18247 0 0 18247 4747 busybox.t0/editors/awk.o
18134 0 0 18134 46d6 busybox.t1/editors/awk.o
|
|
function old new delta
evaluate 6448 6728 +280
awk_getline 676 705 +29
parse_expr 726 752 +26
next_token 917 943 +26
next_input_file 237 252 +15
awk_split 498 510 +12
awk_sub 632 643 +11
split_f0 160 170 +10
getvar_s 98 108 +10
...
chain_loop 128 121 -7
nvalloc 179 171 -8
chain_node 107 99 -8
mainseq 12 - -12
endseq 12 - -12
chain_group 640 628 -12
beginseq 12 - -12
awk_exit 112 100 -12
fsrealloc 127 110 -17
static.v 20 - -20
static.rsm 24 - -24
ttt 28 - -28
parse_program 339 311 -28
static.sreg 32 - -32
intvar 76 - -76
static.tspl 84 - -84
rsplitter 84 - -84
fsplitter 84 - -84
------------------------------------------------------------------------------
(add/remove: 0/39 grow/shrink: 16/11 up/down: 439/-685) Total: -246 bytes
|
|
tr: stop using globals needlessly.
code: -103 bytes
|
|
size is smaller too (subject to arch differenced I guess)
|
|
|
|
*: s/include "busybox.h"/include "libbb.h"
|
|
This is how it goes. I break stuff by doing useless 'cleanups',
people fix the fallout. :(. Thanks rockeychu!
|
|
|
|
move 'extern environ' up to the location of #includes
|
|
awk: some 'lineno' vars were shorts, made them ints (code got smaller)
awk: rename global t to global ttt. still an awful name, but at least
you can grep for it now.
function old new delta
ttt - 28 +28
mysleep 104 120 +16
readit 408 418 +10
lineno 2 4 +2
parse_program 338 339 +1
evaluate 6446 6445 -1
syntax_error 25 23 -2
next_token 917 915 -2
new_node 26 24 -2
tv 16 8 -8
skip_spaces 68 53 -15
t 28 - -28
rfds 128 - -128
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 4/6 up/down: 57/-186) Total: -129 bytes
|
|
|
|
|
|
(broke when getopt32 was fixed to not reverse the list)
|
|
|
|
Put big scary warnings in relevant places.
|
|
function old new delta
tar_main 705 695 -10
sort_main 928 918 -10
decode_format_string 886 876 -10
run_parts_main 197 185 -12
ps_main 513 500 -13
wget_main 2764 2750 -14
awk_main 1014 1000 -14
od_main 2886 2866 -20
llist_rev 25 - -25
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/8 up/down: 0/-128) Total: -128 bytes
|
|
patch: do not try to delete same file twice
|
|
|
|
('size' happily displays 0 bytes in data and bss,
but in reality sed.o used 180 bytes of it). Oh well.
function old new delta
pipe_putc 67 76 +9
sed_main 627 633 +6
get_next_line 161 166 +5
bbg 180 - -180
(add/remove: 0/1 grow/shrink: 3/0 up/down: 20/-180) Total: -160 bytes
sed: also make sed -i failure message less cryptic
|
|
|
|
|
|
|
|
|
|
also optimize many strlen() calls.
if (strlen(buf) <= 0) goto vc1 - ??!!
|
|
|
|
(needed for uclibc build, btw). Add testcase for it.
|
|
|
|
|
|
|
|
|
|
no preceding prototype
|
|
|
|
|
|
remaining: shell (rather scary mess in msh.c)
|
|
|
|
|
|
|
|
|
|
but more importantly make code more understandable
|
|
|
|
sed: de-obfuscate piece of code
|
|
|
|
|
|
|
|
|
|
can act quite mysteriously
date: add if(ENABLE_LOCALE_SUPPORT)
|
|
(still has quite a lot of statics etc...).
getopt32-ification.
|