OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] String interning (Was: [xml-dev] Binary XML == "spawn of t

[ Lists Home | Date Index | Thread Index ]

On Thursday 31 July 2003 19:36, Mike Champion wrote:
> On Thu, 31 Jul 2003 17:46:32 -0400, Tyler Close <tyler@waterken.com> wrote:
> > For an example of a binary format that supports efficient string
> > interning, without a penalty to generality, see:
> >
> > http://www.waterken.com/dev/Doc/code/
>
> Very interesting point/idea.

Thanks.

> AFAIK much of the overhead of XML text
> parsing that the binary infoset advocates complain about is in the Unicode
> encoding/decoding and raw string processing (e.g, looking at every
> character to see where an element ends rather than having a stored length).

The Waterken(TM) Doc code format uses a chunked representation for
encoding a string.  This provides the speed benefits of a length
prefix without creating an unlimited buffering requirement.

>  Likewise, a number of alternative infoset serializations use the "stream
> of SAX events" metaphor, that sounds a bit like what that document
> describes.

Same basic idea.

> But  that doesn't sound like "string interning" to me (and "interning" is
> not mentioned in that document).

Notice that all the meta data (ie: the string identifiers) are
stored in a set of string registers. Subsequent uses of a string
specify the index of the string to use. This results in each
string identifier being instantiated just once. The singleton
instance is the interned instance.

> I thought "interning" was more of a
> technique for keeping compiled code small by referencing redundant strings
> via their hash values.

It's more to do with fast lookup than memory savings. The hash
only gets computed once and equality checks are just pointer
comparisons. Same thinking is at work in the Doc code format.

> That basic idea is certainly used in all sorts of
> compression schemes ....but are you sure that's what the Waterken
> serialization model is doing?

Pretty sure. I designed it.

> I suppose the Waterken(TM) stuff is IP-encumbered up the wazoo, eh?

The license is specified on the Waterken(TM) Doc homepage. It is
Open Source. See:

http://www.waterken.com/dev/Doc/

Tyler




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS