[Home] [By Thread] [By Date] [Recent Entries]

  • From: David Megginson <david@m...>
  • To: xml-dev-digest@i...
  • Date: 17 Jan 2000 21:17:53 -0500

Tyler Baker <tyler@i...> writes:

> As you can see an identity test is done right off the bat so if you make a call like this:
> 
> if (foo.equals("x")) {
> 
> }
> 
> And foo == "x", then your only additional overhead to a straight identity test is the
> dynamic method invocation of String.equals().

Only if the strings are equal -- if you're in a long switch statement, 
most of them won't be equal, and the overhead will be much more than
the function call.


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.



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member