[Toybox] Performance on compress.c
Rob Landley
rob at landley.net
Fri Jul 10 10:18:34 PDT 2015
On 07/10/2015 10:42 AM, Yeongdeok Suh wrote:
>
>
> 2015-07-10 14:53 GMT+09:00 Rob Landley <rob at landley.net
> <mailto: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.
Sorry, meant inflate. I haven't finished implementing deflate yet, got
distracted by 37 other things. (When to do dictionary resets is a
judgement call I can't come up with a good answer for, put it on the
todo list, my todo list runneth over...)
> 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.
I can poke at it myself but probably not until after 1.0. Right now
filling in missing functionality is higher priority than performance
tuning for anyhing non-pathological.
> > 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.
The code block you highlighted is doing write() calls.
> Rob
Rob
1436548714.0
More information about the Toybox
mailing list