Re: cleaner/better zlib sources?
- From
- Matt Mackall <mpm@selenic.com>
- Date
- Mar 16, 2007, 01:14 UTC
- Message-ID
- <20070316011457.GA4892@waste.org>
- In-Reply-To
- <45F9EED5.3070706@garzik.org>
On Thu, Mar 15, 2007 at 09:11:49PM -0400, Jeff Garzik wrote:
Show 7 quoted lines
> Linus Torvalds wrote: > >Now, it's possible that I'm just wrong, but the instruction-level profile > >really did pinpoint the "look up state branch pointer and jump to it" as > >some of the hottest part of that function. Which is just *evil*. You can > > ISTR there are a bunch of state transitions per byte, which would make > sense that it shows up on profiles.
Yep, not surprising.
Show 10 quoted lines
> >Now, I'm just wondering if anybody knows if there are better zlib > >implementations out there? This really looks like it could be a noticeable > >performance issue, but I'm lazy and would be much happier to hear that > >somebody has already played with optimizing zlib. Especially since I'm not > >100% sure it's really going to be noticeable.. > > I could have sworn that either Matt Mackall or Ben LaHaise had cleaned > up the existing zlib so much that it was practically a new > implementation. I'm not aware of any open source implementations > independent of zlib (except maybe that C++ behemoth, 7zip).
I cleaned up the version in lib/ that's used for boot on most systems. It's quite a bit simpler and cleaner than the code lib/zlib (and elsewhere!). But making it faster is another matter entirely - I don't know off-hand how the two compare.
-- Mathematics is the supreme nostalgia of our time.