[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Refreshed genx.h, plus some plans

  • To: xml-dev@l...
  • Subject: Re: Refreshed genx.h, plus some plans
  • From: David Tolpin <dvd@d...>
  • Date: Sat, 24 Jan 2004 22:46:47 +0400 (AMT)

Re:  Refreshed genx.h
> genxElement genxDeclareElement(genxWriter w, utf8Byte * namespaceURI, 
> utf8Byte * type);
> genxAttribute genxDeclareAttribute( ... same args ... );
> 
> Then you have
> 
> int genxFastStartElement(genxWriter w, genxElement element);
> int genxFastAttribute(genxWriter w, genxAttribute attribute, utf8Byte * 
> value);
> 
> I think that with a little bit of care in the code, this should 
> generate guaranteed-WF canonical XML at speeds close enough to the most 
> deranged pedal-to-the-metal custom C code to vanish in the static of 
> any conceivable application.  Would this be premature optimization? 

It sounds to me like manual reference counting in an environment where
automatic garbage collection is available; I would prefer a little
slower optimization, which memoizes pointers to strings and compares
strings by reference, then by value. It will be almost as fast 
for most applications, and the user will have the freedom to do exactly the
same to optimize -- to predeclare the names in one place, without
keeping extra variables when it does not need to.

David Tolpin

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.