Home All Groups Group Topic Archive Search About

in VB, String '=' is two orders of magnitude slower than .Equals!

Author
25 Aug 2006 8:45 PM
PJ6
Just stumbled accross this article, thought it would be interesting to
share.

Paul

http://www.thecodingmonkey.net/PermaLink.aspx?guid=112144590767701842

Author
25 Aug 2006 9:03 PM
David Browne
"PJ6" <no***@nowhere.net> wrote in message
news:eNrh2dIyGHA.1936@TK2MSFTNGP06.phx.gbl...
> Just stumbled accross this article, thought it would be interesting to
> share.
>
> Paul
>
> http://www.thecodingmonkey.net/PermaLink.aspx?guid=112144590767701842
>

The article is useless.  The author's diagnosis of the problem is way off.
There's no COM interop involved.  And the test is done on .NET 1.1.  The
performance difference has disappeared in 2.0.

David
Author
25 Aug 2006 10:12 PM
AMercer
> ... And the test is done on .NET 1.1.  The
> performance difference has disappeared in 2.0.

For the record, my testing confirms that under fw 1.1, the (almost) 2 to 1
performance loss of '=' vs .equals is true.  I'm glad to hear that the
problem is gone in 2.0.
Author
25 Aug 2006 9:15 PM
Chris Dunaway
PJ6 wrote:
> Just stumbled accross this article, thought it would be interesting to
> share.
>
> Paul
>
> http://www.thecodingmonkey.net/PermaLink.aspx?guid=112144590767701842

Did you check out the link in one commenter rebuttal?  I tend to
disbelieve that the = is slower because I believe that the testing
methodology was wrong.

Here is the link to a rebuttal:

http://addressof.com/blog/archive/2005/12/07/9298.aspx

Regards,

Chris
Author
25 Aug 2006 10:00 PM
Herfried K. Wagner [MVP]
"PJ6" <no***@nowhere.net> schrieb:
> Just stumbled accross this article, thought it would be interesting to
> share.
>
> http://www.thecodingmonkey.net/PermaLink.aspx?guid=112144590767701842

I strongly recommend to read the comments on this article on the bottom of
the page referenced above.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
28 Aug 2006 2:15 PM
PJ6
Sorry, my bad.

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:OVCmkHJyGHA.4536@TK2MSFTNGP04.phx.gbl...
> "PJ6" <no***@nowhere.net> schrieb:
>
> I strongly recommend to read the comments on this article on the bottom of
> the page referenced above.