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

Re: Sting interning: test cases wanted.

  • From: David Megginson <david@m...>
  • To: xml-dev@i...
  • Date: 14 Jan 2000 15:50:22 -0500

string intern test
Miles Sabin <msabin@c...> writes:

> Doug Lea (Java concurrency guru, for those of you who don't
> recognize the name) has very generously offered to run some 
> String.intern() benchmarks on a 4 way Sun box to give us a bit
> of empirical input into this debate.
> 
> All we have to do is come up with plausible test cases. They
> needn't (in fact, probably shouldn't) be full blown parsers and
> handlers, just typical patterns of String.intern(),
> String.equals() and ==, which can be looped and replicated
> across a variable number of threads.

Why not try the real thing?

Download Microstar's AElfred XML parser from

  http://www.microstar.com/aelfred.html

By default, this parser doesn't use java.lang.String.intern in its
intern functions.  Look for the following line in XmlParser.java (on
or about line 2,413):

				// OK, add it to the end of the
				// bucket.
    String s = new String(ch, start, length);

Make a second copy and change it to read

				// OK, add it to the end of the
				// bucket.
    String s = new String(ch, start, length).intern();

Get the biggest batch of XML documents you can collect (or set up
scripts to generate some dynamically from whatever data structures you
can get your hands on, even system calls) and build your test
architecture: four parsers running in parallel, each processing
documents in serial: first with the original version of AElfred, then
with the modified version.

It will be very interesting to see the results.


All the best,


David

-- 
David Megginson                 david@m...
           http://www.megginson.com/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions now closed in preparation for transfer to OASIS.



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.