--- Charles Oliver Nutter <[EMAIL PROTECTED]>
wrote:

> Leo User wrote:
> > Hello Mister Nutter,
> > 
> > the bzip2 has made a great leap today and now
> appears
> > to be outperforming the Apache code.  The critical
> > change came when I realised that the blocksort
> code
> > was always using the fallback sorts.  So I fixed
> some
> > bugs and that  problem no longer appears to be
> true. 
> > Some rough timings:
> > 
> >  a 2 MB jar files took under 2 seconds to bzip2,
> from
> > the Apache code it looks like 8 seconds.  A 45MB
> tar
> > file takes about 45 seconds, Apache takes about
> 55.
> > 
> > So it seems that performance wise, I no longer
> need to
> > consider the Apache code a contender.  Maybe we
> can
> > boost things further?  The fallback sorts are
> pretty
> > much flattened: direct array access appear
> everywhere,
> > method invocations are almost non-existent.  I
> dislike
> > this pattern, but the bytes really need to be
> churned
> > as quickly as they can and methods even if they
> are
> > compiled seem to add overhead.  Ill have to think
> > about this, maybe reverse the decision.
> 
> That's great news Leo...do you have your code
> available somewhere? How 
> close do you think you are to releasing? If you're
> now the fastest bz2 
> impl on Java, it's probably a great time to get it
> out there.
>

I need to go through a couple of more phases.  Maybe
Ill put it up before decompression work begins, though
Id like to be able to run all the tests that come with
bzip2 before that.  Being able to compress the
jython.jar file and a tar of a subversion package
gives me some confidence that the code will be able to
handle these tests.  Initially compression was only
able to handle a repetition of "how now brown cow".  

Im working on inlining the method calls in the "quick"
path.  Ive thought about it some, though it uglifies
the code it does make it more like the C code.  The C
code doesn't call functions to get its data, it just
accesses the array, whatever data guise its in.  The
negative, of course, is if that it makes the code more
bug prone, typically to get the data with 1 C array
access you need 2-4 accesses with bit manipulation.

So far, on the big 45 MB test its cut down the time
from 45 seconds to 38-39 seconds.  I had originally
thought that it would be nice to get close to the
Apache time, but now that its moving beyond that Id
like to get it closer to the C time(egads!).

leouser

 
> - Charlie
> 
>
---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 



       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play 
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to