git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] 3% tighter packs for free

From
Nicolas Pitre <nico@cam.org>
Date
Mar 18, 2006, 18:23 UTC
Message-ID
<Pine.LNX.4.64.0603181315060.4889@localhost.localdomain>
In-Reply-To
<7vwtesxloi.fsf@assigned-by-dhcp.cox.net>
On Fri, 17 Mar 2006, Junio C Hamano wrote:
Show 8 quoted lines
> Once you make it into a patch form, it is plainly obvious that
> this is a good optimization.  Since our BLK_SIZE is 16 bytes,
> you are grabbing up to 15 more bytes (on average 8 more bytes or
> so) for every match after a partially modified block.
> 
> Very nice.  I wonder if a larger BLK_SIZE (say 32 bytes) would
> give us faster packing without losing much compression if we use
> this idea.

Tried that long ago. As BLK_SIZE is increased the adler32 cost, which has to be computed for every offset in the target buffer, increases accordingly. So you end up with both worse compression and more CPU usage.

Nicolas
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “3% tighter packs for free”
  1. 3% tighter packs for freeNicolas Pitre, Mar 18, 2006
  2. Junio C HamanoMar 18, 2006
  3. Nicolas PitreMar 18, 2006
  4. Junio C HamanoMar 18, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.