Blogroll Me!

Lives in India/Chennai/Chennai, speaks English.
This is my blogchalk:
India, Chennai, Chennai, English.

A blog on what is happening in the .NET world in India.  

Anand's .NET WebLog


Home Archives Contact

Tuesday, April 29, 2003 :::
 

There was a discussion at my place on whether using string=String.Empty is slower that String.Length=0. I was always of the opinon that a numeric comparison should be faster that a string comparison(So even in VB6 I prefer Len(string)=0 kind of checks) and so checking the length would be the fastest. FxCop also has a rule in the latest version 1.091 that can check comparisons and raise a exception.

Brad has talked to one to the dev guys in MS and his reply was, that the Length check has a shorter execution path. Check out Brad's post.




::: posted by Anand at 11:55 AM

Comments: Post a Comment

 
Subscribe to Anand's .NET WebLog!


powered by Bloglet


Listed on Blogwise Listed on BlogShares Technorati Profile

Powered by Blogger