public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Leber <christian@leber.de>
To: Paulo Marques <pmarques@grupopie.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] lzma support: decompression lib, initrd support
Date: Tue, 14 Jun 2005 14:54:18 +0200	[thread overview]
Message-ID: <20050614125418.GA12944@core.home> (raw)
In-Reply-To: <42AECFF3.7030604@grupopie.com>

On Tue, Jun 14, 2005 at 01:39:15PM +0100, Paulo Marques wrote:
> >[...]
> >>+	for (pb = 0; prop0 >= (9 * 5); pb++, prop0 -= (9 * 5));
> >>+	for (lp = 0; prop0 >= 9; lp++, prop0 -= 9);
> >
> >Put the ";" on a line of its own.
> >
> >I'd have thought the above could be done arithmetically?
> 
> I just tried a small test program to see the speed/code size difference 
> to this code, which is the arithmetic equivalent:
> 
>   pb = prop0 / (9 * 5);
>   prop0 %= (9 * 5);
>   lp = prop0 / 9;
>   prop0 %= 9;
> 
> This code runs a lot faster than the original. This is not very 
> important since it runs only once AFAICT.

Was allready fixed in the newer version.
But i doubt that this _few_ cycles matter in any way.

The odd thing is, that the orginal lzma author has both version in the
lastest version of his sdk, but commented out the arithmetic version ?!?

> As for the code size, it is smaller if compiled with -Os, but larger 
> when compiled with -O2 or -O3.

-O3 helps a lot for the actual decompression


Christian Leber

-- 
http://www.nosoftwarepatents.com


      reply	other threads:[~2005-06-14 12:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-07 21:32 [PATCH 1/2] lzma support: decompression lib, initrd support Christian Leber
2005-06-07 21:59 ` Andrew Morton
2005-06-12 21:43   ` Christian Leber
2005-06-13 20:03     ` Jesper Juhl
2005-06-13 23:33       ` Christian Leber
2005-06-13 21:35     ` Roman Zippel
2005-06-14 12:39   ` Paulo Marques
2005-06-14 12:54     ` Christian Leber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050614125418.GA12944@core.home \
    --to=christian@leber.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmarques@grupopie.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox