[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ordered indexing for integers

Howard Chu writes:
>Hallvard B Furuseth wrote:
>> I wrote:
>>> Also the index is wrong for huge numbers.  At some point the indexing
>>> should just give up and use max/min values, but I suppose at least
>>> cryptograpy-sized numbers should be usefully indexed.  I.e. at least
>>> two length bytes.
> I wonder about that. Two length bytes implies 512Kbit numbers. Who's
> going to be storing those in LDAP?

2 "length bytes" - (3 sign bits and delimiter bit) => 31Kbit, I think.
But yes.  I merely wrote support for more than 2 length bytes since
it didn't seem more code than for 0-2 length bytes.

>> Eeh.  It makes more sense to check for ridiculous-sized numbers before
>> parsing them and just output a min/max value depending on sign.  (Or
>> right-truncate e.g. n*12 digits and add n*5 to the length.)
> Sounds fine.

Looking at it now... not sure if I'll have time today though.
(I assume I can go ahead and change the size, since you just changed the
presence key size.)