Re: [PATCH 2/3] fast-export: use object to uint32 map instead of "decorate"

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

 



On Fri, Jul 15, 2011 at 11:40:02AM +0200, Sverre Rabbelier wrote:

> On Thu, Jul 14, 2011 at 19:52, Jeff King <peff@xxxxxxxx> wrote:
> > Previously we encoded the "mark" mapping inside the "void *"
> > field of a "struct decorate". It's a little more natural for
> > us to do so using a data structure made for holding actual
> > values.
> >
> > Signed-off-by: Jeff King <peff@xxxxxxxx>
> > ---
> > And this is an example of use. It doesn't save all that much code, but I
> > think it's a little more natural. It can also save some bytes of the hash
> > value in each entry if your pointers are larger than 32-bit.
> 
> Did you run any benchmarks on this?

No, I didn't. I expect it to be exactly the same on x86_64. We save
32-bits of pointer space, but the generality I mentioned in patch 1
wastes 32-bits of space for the "used" flag. So it evens out,
space-wise.

The time complexity should be exactly the same (the macro definitions
are more or less the exact decorate code, but with the types
parameterized, so the generated code should be the same).

But I'm not sure this code is going to end up used, anyway. It looks
like we might add a generation header after all.

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