vis781
Well-known member
Just a quick tip for all those out there who weren't aware how slow the = operator is for comparing strings when timed against the .equals function.
Are you ready for this........
The = operator is two orders of magnitude slower than the .equals function!!
Believe it or not the = operator uses old vb through com interop which means the string has to be marshalled out of managed memory into unmanaged memory.
This was news to me. I mean I used the = operator sometimes if i couldn't be bothered to type the extra bit.. lazy eh!! but now i am totally converted.
Are you ready for this........
The = operator is two orders of magnitude slower than the .equals function!!
Believe it or not the = operator uses old vb through com interop which means the string has to be marshalled out of managed memory into unmanaged memory.
This was news to me. I mean I used the = operator sometimes if i couldn't be bothered to type the extra bit.. lazy eh!! but now i am totally converted.