Re: [PATCH] pack-object: trim memory usage a tiny bit

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

 



Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> wrote:
> 
> Ah, by packing it tighter using bitfields. There are two fields that
> act as boolean, but they use at least one byte each. And enum
> object_type, I recall, uses 4 bytes (int), while it only needs 5 bits
> (4 bits is enough if OBJ_BAD is not counted). No downsides I know of.

Actually, object type is 3 bits in the pack file.  So unless its
using some additional magical values, 4 bits is sufficient to get
you 3 bits and the -1 bad value.

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