Re: [PATCH 1/8] implement generic key/value map

2012-08-06 Thread Jeff King
On Sat, Aug 04, 2012 at 03:58:10PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > It is frequently useful to have a fast, generic data > > structure mapping keys to values. We already have something > > like this in the "decorate" API, but it has two downsides: > > > > 1. The key type

Re: [PATCH 1/8] implement generic key/value map

2012-08-04 Thread Junio C Hamano
Jeff King writes: > It is frequently useful to have a fast, generic data > structure mapping keys to values. We already have something > like this in the "decorate" API, but it has two downsides: > > 1. The key type must always be a "struct object *". > > 2. The value type is a void pointer,

[PATCH 1/8] implement generic key/value map

2012-08-04 Thread Jeff King
It is frequently useful to have a fast, generic data structure mapping keys to values. We already have something like this in the "decorate" API, but it has two downsides: 1. The key type must always be a "struct object *". 2. The value type is a void pointer, which means it is inefficie