From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Sverre Rabbelier <srabbelier@gmail.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH] pack-object: trim memory usage a tiny bit
Date: Sat, 7 Aug 2010 10:21:31 +1000 [thread overview]
Message-ID: <AANLkTinFQan-kdaW-wQ5Ca6WATgpDQzhA68w7WODeEFE@mail.gmail.com> (raw)
In-Reply-To: <20100807001829.GQ25268@spearce.org>
On Sat, Aug 7, 2010 at 10:18 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> 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.
Right. Obviously I miscounted.
--
Duy
prev parent reply other threads:[~2010-08-07 0:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 17:00 [PATCH] pack-object: trim memory usage a tiny bit Nguyễn Thái Ngọc Duy
2010-08-06 23:58 ` Sverre Rabbelier
2010-08-07 0:03 ` Nguyen Thai Ngoc Duy
2010-08-07 0:04 ` Sverre Rabbelier
2010-08-07 0:16 ` Nguyen Thai Ngoc Duy
2010-08-07 0:18 ` Shawn O. Pearce
2010-08-07 0:21 ` Nguyen Thai Ngoc Duy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinFQan-kdaW-wQ5Ca6WATgpDQzhA68w7WODeEFE@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
--cc=srabbelier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).