|
-
Jan 29th, 2013, 06:54 AM
#1
Thread Starter
Junior Member
[RESOLVED] Parsing data, which is better??
Hello guys,
You who have years of experience, how do you think? Which built-in function is fast performing? Mid, or Instr? Because Sometimes we are able to use both of them to parse some Data. I used for my project both of them. Maybe I'm wrong but Instr seems to be slower? I'm talking when you're getting data to be parsed from the network. Maybe there is a difference between local file manipulation and remote file manipulation? Just wanted to know what people think about it?
Much appreciated your time to answer this question,which will help us (to newbies) growing and getting more and more experience.
Thanks in advance!
-
Jan 29th, 2013, 07:38 AM
#2
Re: Parsing data, which is better??
Short answer: In general, InStr will be faster than Mid$, simply because InStr searches the string while Mid$ creates a new string.
Detailed answer: Read the following articles from Aivosto to get a better understanding:
Optimize string handling in VB6 - Part I
Optimize string handling in VB6 - Part II
Optimize string handling in VB6 - Part III
VB InStr
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
-
Jan 30th, 2013, 05:19 AM
#3
Thread Starter
Junior Member
Re: Parsing data, which is better??
Great articles! Reading them Thanks a lot!
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
|