[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Maintaining NodeID sanity

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-05-10 23:58:02 CEST

Greg Stein wrote:

>On Fri, May 10, 2002 at 03:52:12PM -0500, Karl Fogel wrote:
>
>
>>Greg Stein <gstein@lyra.org> writes:
>>
>>
>>>Oh. Using base64 (strings) would be a negative system perf change, given the
>>>ID comparison pointed out above.
>>>
>>>
>>Um, we're talking about reading data from db pages here. I somehow
>>doubt that key comparison is a meaningful performance bottleneck.
>>
>>
>
>Oh, it's still moot [because of the I/O], it is just that at a micro level,
>using strings rather than integers [in the ID structure] is a negative
>impact.
>
>
>Seriously... the ID structure should be integers. Thus, you would also want
>to marshal the IDs into BDB as integers.
>
Oh my, I'm gonna love this, beating you both down:

    * Base64 conversion is faster than itoa (no division); more natural
      for marshaling integers
    * Base64 representation is not user-friendly, because it's
      case-sensitive and uses non-alphanumeric characters (among them
      the famous ".", which is liable to screw up key parsing)

Might I suggest Base16? Perhaps with a little gold leaf around the
hinges, and a nickel-plated padlock? :-)

>Do you have a specific problem with that approach?
>
>

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 10 23:59:05 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.