Denys Vlasenko
c2a51b0cf1
bzip2: work around bad compiler optimization
...
gc-6.1.1 x86_64:
function old new delta
generateMTFValues 380 367 -13
gcc-4.3.1 386:
function old new delta
inner_loop - 41 +41
generateMTFValues 357 294 -63
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 41/-63) Total: -22 bytes
gcc-6.3.0 386:
function old new delta
inner_loop - 36 +36
generateMTFValues 363 250 -113
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 36/-113) Total: -77 bytes
The last case, gcc-6.3.0, runs almost 3 times faster after this change.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-05 00:34:08 +01:00
Denys Vlasenko
86be6d5ba9
bzip2: move ->origPtr out of struct EState, make a few members smaller
...
function old new delta
BZ2_compressBlock 223 228 +5
BZ2_blockSort 85 88 +3
generateMTFValues 356 357 +1
handle_compress 355 349 -6
compressStream 538 531 -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 9/-13) Total: -4 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 20:51:12 +01:00
Denys Vlasenko
e59e5ff96e
bzip2: reduce indentation, no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 15:59:46 +01:00
Denys Vlasenko
9e5662ea74
bzip2: reuse zPend processing code
...
function old new delta
generateMTFValues 378 357 -21
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 15:53:17 +01:00
Denys Vlasenko
2cfe10a558
bzip2: shrink makeMaps_e()
...
function old new delta
generateMTFValues 378 368 -10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 15:31:54 +01:00
Denys Vlasenko
1cbcb02316
bzip2: optimize zPend variable code
...
function old new delta
generateMTFValues 433 378 -55
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 15:26:00 +01:00
Denys Vlasenko
fc228b48c9
bzip2: have two separate "store bit 0" and "store bit 1" functions
...
function old new delta
sendMTFValues 2051 2085 +34
bsW1_0 - 33 +33
BZ2_compressBlock 225 223 -2
bsW1 52 - -52
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/1 up/down: 67/-54) Total: 13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 14:56:43 +01:00
Denys Vlasenko
feafb3423e
bzip2: ~1% speedup by special-casing "store 1 bit" function
...
function old new delta
bsW1 - 52 +52
BZ2_compressBlock 230 225 -5
BZ2_blockSort 125 118 -7
sendMTFValues 2070 2051 -19
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 52/-31) Total: 21 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 04:43:46 +01:00
Denys Vlasenko
982c44d030
bzip2: rewrite bit of code which depends on integer overflow
...
function old new delta
sendMTFValues 2093 2070 -23
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 03:34:40 +01:00
Denys Vlasenko
83dd4ff696
bzip2: delete write-only fave[] array
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 03:17:48 +01:00
Denys Vlasenko
3a2c97bd12
bgip2: fewer specifically-sized [u]int32_t's locals in sendMTFValues
...
Generic ints/unsigneds are usually fine. Yes, really.
function old new delta
sendMTFValues 2100 2093 -7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 03:14:07 +01:00
Denys Vlasenko
359230da8e
bzip2: code shrink
...
function old new delta
sendMTFValues 2111 2100 -11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 02:03:42 +01:00
Denys Vlasenko
e594fb2171
bzip2: code shrink
...
function old new delta
BZ2_compressBlock 225 230 +5
handle_compress 356 355 -1
bsW16 59 56 -3
bsW 64 61 -3
bsFinishWrite 37 32 -5
prepare_new_block 48 34 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/5 up/down: 5/-26) Total: -21 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-03 01:30:12 +01:00
Denys Vlasenko
125c3ff4b1
bzip2: code shrink
...
function old new delta
bsW16 - 59 +59
sendMTFValues 2116 2111 -5
bsPutU16 36 - -36
bsPutU32 76 31 -45
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/2 up/down: 59/-86) Total: -27 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-02-02 20:59:28 +01:00
Maninder Singh
97f2f7ca7f
Removes stray empty line from code
...
This patch removes stray empty line from busybox code
reported by script find_stray_empty_lines
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-13 03:25:46 +02:00
Denys Vlasenko
9b2a9f0210
fix assorted unused code and wrong format specs found by cppchekc (bug 6716)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-29 16:43:33 +01:00
Denys Vlasenko
5117eff6f9
Fix some compiler warnings emitted by gcc-4.8.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-16 14:21:20 +02:00
Denys Vlasenko
522041ee7b
regularize options which control size/speed trade
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-10 13:25:57 +02:00
Denys Vlasenko
60a9414cad
fix "variable 'foo' set but not used" warnings
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 20:57:01 +02:00
Denys Vlasenko
833d4e7f84
rename archival/libunarchive -> archival/libarchive; move bz/ into it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:38:31 +01:00