String interning

Miles Sabin msabin at
Fri Jan 14 22:19:11 GMT 2000

David Megginson wrote,
> Java2 on Linux.  Here's the code (uncomment or comment the 
> appropriate lines):

Which JIT? The last time I looked (admittedly quite a while
ago) TYA wasn't too quick.

> [snip: benchmark]

OK, I'll have to tweak this slightly: Hotspot needs a bit of
a run up.

> How do you run timings under Windows, by the way?

Sort of shelling out for various tools the best you can do is,

  long startTime = System.currentTimeMillis();
  // do stuff
  long endTime = System.currentTimeMillis();

I'll do this on NT over the w/e, and on Solaris Sparc when I
get back to work on Monday.



Miles Sabin                       Cromwell Media
Internet Systems Architect        5/6 Glenthorne Mews
+44 (0)20 8817 4030               London, W6 0LJ, England
msabin at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions now closed in preparation for transfer to OASIS.

More information about the Xml-dev mailing list