unlzma speedup

Pascal Bellard pascal.bellard at ads-lu.com
Thu Apr 23 22:16:41 UTC 2009


Hello,

Please find attended a patch for about 10% speedup and
about 300 bytes shrink (without LZMA_FAST):

Time to decompress without LZMA_FAST: -11%
==========================================

$ time ./busybox.org_size unlzma -c /boot/rootfs.gz-2.0 | md5sum
real    0m 14.19s
user    0m 13.16s
sys     0m 0.13s
b631970b154408227c9490abdcf70fab  -

$ time ./busybox.new_size unlzma -c /boot/rootfs.gz-2.0 | md5sum
real    0m 12.53s
user    0m 11.51s
sys     0m 0.10s
b631970b154408227c9490abdcf70fab  -

Time to decompress with LZMA_FAST: -14%
=======================================

$ time ./busybox.org_speed unlzma -c /boot/rootfs.gz-2.0 | md5sum
real    0m 11.06s
user    0m 10.03s
sys     0m 0.17s
b631970b154408227c9490abdcf70fab  -

$ time ./busybox.new_speed unlzma -c /boot/rootfs.gz-2.0 | md5sum
real    0m 9.51s
user    0m 8.48s
sys     0m 0.15s
b631970b154408227c9490abdcf70fab  -

Time without/with LZMA_FAST : -24%

Size without LZMA_FAST : -293 bytes
===================================

$ size archival/libunarchive/decompress_unlzma.o.org_size
   text    data     bss     dec     hex filename
   2102       0       0    2102     836
archival/libunarchive/decompress_unlzma
.o.org_size
$ size archival/libunarchive/decompress_unlzma.o.new_size
   text    data     bss     dec     hex filename
   1809       0       0    1809     711
archival/libunarchive/decompress_unlzma
.o.new_size

Size with LZMA_FAST : +391 bytes
================================

$ size archival/libunarchive/decompress_unlzma.o.org_speed
   text    data     bss     dec     hex filename
   2518       0       0    2518     9d6
archival/libunarchive/decompress_unlzma
.o.org_speed
$ size archival/libunarchive/decompress_unlzma.o.new_speed
   text    data     bss     dec     hex filename
   2907       0       0    2907     b5e
archival/libunarchive/decompress_unlzma
.o.new_speed
b631970b154408227c9490abdcf70fab  -

Size without/with LZMA_FAST : +1098 bytes

Hope it helps,

-pascal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unlzma.u
Type: application/octet-stream
Size: 10692 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090424/535db9e5/attachment-0001.obj>


More information about the busybox mailing list