[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: bit.lshift and performance - luabitop v.s. lua-5.2.0-work4
- From: David Manura <dm.lua@...>
- Date: Thu, 14 Oct 2010 22:00:35 -0400
On Thu, Oct 14, 2010 at 10:46 AM, KHMan <firstname.lastname@example.org> wrote:
> On 10/13/2010 10:34 AM, David Manura wrote:
>> Another area of difficulty involves a function that reverses the order
>> of bits ....
> Do you have timing data on the relative cost of building the Huffman trees?
> Should check it before deciding on whether to optimize this. It is called up
> to only ~300 times for both tables and this is done once per block of max
> 64KB of data. In any case, this one is restricted to the lengths of the
> Huffman code, 1-15 bits, as stated in the source code.
It is fairly minor. The bit reverse is called only 322 times when
decompressing the ~200KB lua-5.1.4.tar.gz.
The more time consuming places seem to deal with the small loops of
reading/writing bits from the stream.