[Toybox] Performance on compress.c

Yeongdeok Suh skyducks111 at gmail.com
Fri Jul 10 08:42:58 PDT 2015


2015-07-10 14:53 GMT+09:00 Rob Landley <rob at landley.net>:

> On 07/09/2015 05:41 AM, Yeongdeok Suh wrote:
> > I discovered slow decompression while testing gunzip.
> > I want to discuss about this improvement.
> >
> > I gunzipped an 15MB *.tar.gz file on the ARM board, and it takes around
> > 17 sec.
> > It's too slow, so I want to improve this for ARM based environment.
> > (x86 was okay)
>
> So I looked at it some more and the deflate performance is kinda
> pathetic, I did "time zcat linux-4.0.tar.gz > /dev/null" and toybox's
> zcat is about half the speed of the ubuntu zcat. (I was going for simple
> code and didn't particularly optimize it at all.)
>
> So I agree it could be faster and I'm all for speeding it up, but I need
> to figure out where the slowness _is_ first.
>

Actually, I'm analyzing the gzip inflate mechanism yet.
As you said, the code is simple but I think it can be improved.
If I have any idea about this, I'll share via mailing list.


>
> > As I debugged the src,
> > below while loop takes too much time when decoded huffman symbol is over
> > 256.
>
> Could you tell me how you "debugged the src"? (What profiling tool did
> you use?)
>

I didn't use anything special tools. I'm using gdb,
and I just checked speed of some code blocks via clock() function.


> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20150711/b00179f7/attachment-0004.htm>


More information about the Toybox mailing list