Re: Why SHA are 40 bytes? (aka looking for flames)

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

 



"H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
> Nicolas Pitre wrote:
> >
> >Object names aren't 40 bytes.  They are 20 bytes.
> >It  is their hex representation that takes 40 bytes.
> >
> 
> Sure, but that's the way they're stored in *most* git objects, in 
> particular in commit objects.

But OBJ_TREE occurs more often, and its 20 bytes binary for a SHA-1
in those.  They are only ASCII hex in OBJ_COMMIT and OBJ_TAG.

If Nico and I ever get pack v4 done, all SHA-1s drop to 24 bytes
worst case, or 20 + (4 * n_references) best case.  Typically we
found that n_references was large enough, frequently enough, that
we shaved 5% or so off linux-2.6.git.  And I don't think that's
including the 20 * n_objects saved out of the .idx files...

-- 
Shawn.
-
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]