Re: [PATCH] name-rev: Fix non-shortest description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 28 Aug 2007, Jeff King wrote:

> On Tue, Aug 28, 2007 at 10:15:01AM +0100, Johannes Schindelin wrote:
> 
> > Besides, name-rev is already a memory hog.  Your patch makes it worse.
> 
> Let's say we allocate dynamically. The average per-commit number of
> stored merge traversals for linux-2.6 is 1.79. Each traversal is 5 bytes
> (though I think we could easily drop it to 3 or 4 -- do we expect
> generation counters larger 1.7 million?), for an average of 10 bytes
> stored per commit.
> 
> Now compare that to the fact that we no longer need to strdup the
> tip_name. "tags/v2.6.22-rc1~1686^2~1" is _25_ bytes. So it's a net win
> (though not with a static array, obviously).

Good point; I forgot about that strdup.

But then, we could spare even more space when not using an array, but a 
linked list for the generation numbers...  It is a small performance 
impact, but in reality it will not matter, methinks.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux