|
-
Jul 9th, 2005, 05:44 PM
#1
Thread Starter
No place like 127.0.0.1
[RESOLVED] vbTextCompare VS vbBinaryCompare
I am working on a project that uses a lot of string functions and I was wondering if I should be using TextCompare or BinaryCompare and what the difference is? Is binary faster? The only thing I could find on MSDN was this:
http://msdn.microsoft.com/library/de...concompare.asp
I need to know which one is faster and which one is more appropriate under what circumstances. Thanks
-
Jul 9th, 2005, 06:16 PM
#2
Re: vbTextCompare VS vbBinaryCompare
vbTextCompare doesn't take Case into account. IE: "HELLO WORLD!" is the same as "hello world!", 1 uppercase, 1 lowercase. vbBinaryCompare is case sensitive, meaning "HELLO WORLD!" and "hello world!" are different.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jul 9th, 2005, 06:17 PM
#3
Thread Starter
No place like 127.0.0.1
Re: vbTextCompare VS vbBinaryCompare
So there is no difference in the speed it takes to do the check? Or does anyone even know?
-
Jul 9th, 2005, 06:28 PM
#4
Re: vbTextCompare VS vbBinaryCompare
If there is a difference, it would be extremely minescule (sp?). There wouldn't be any point in worrying about the difference. If you must, why not try a loop, GetTickCount, etc. Find which one is faster? 
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jul 9th, 2005, 06:47 PM
#5
Thread Starter
No place like 127.0.0.1
Re: vbTextCompare VS vbBinaryCompare
I knew someone would say that. Nah, I don't care that much. Just curious if anyone knew the answer off hand. chem.
-
Apr 2nd, 2008, 04:56 AM
#6
New Member
Re: [RESOLVED] vbTextCompare VS vbBinaryCompare
vbBinaryCompare is faster than vbTextCompare.
This is because it just the compares the binary represenations of the two strings.
With vbTextCompare it actually has to compare the two strings allowing for different cases (which is going to take more time).
There are some performance figues at: http://www.aivosto.com/vbtips/stringopt2.html
Charlie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|