Re: [PATCH v4 08/23] ewah: compressed bitmap implementation
- From
Jeff King <peff@peff.net>
- Date
- Jan 23, 2014, 20:26 UTC
- Message-ID
- <20140123202645.GA329@sigill.intra.peff.net>
- In-Reply-To
- <CAJo=hJtQG_u4=SjPAgU8h4Wew9LjaXUxnHqTT3Q9E1=_5LJ6Sw@mail.gmail.com>
On Thu, Jan 23, 2014 at 12:14:03PM -0800, Shawn Pearce wrote:
Show 7 quoted lines
> > Yes, the mmap'd buffers aren't necessarily word-aligned. I don't think > > we can fix that easily without changing the on-disk format (which comes > > from JGit anyway). > > Ouch, sorry about that. JGit doesn't mmap the file so we didn't think > about the impact of words not being aligned. I should have caught > that, but I didn't.
Looking over the format, I think the only thing preventing 4-byte alignment is the 1-byte XOR-offset and 1-byte flags field for each bitmap. If we ever have a v2, we could pad the sum of those out to 4 bytes. Is 4-byte alignment enough? We do treat the actual data as 64-bit integers. I wonder if that would have problems on Sparc64, for example.
-Peff