[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!
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
Re: Parsing data, which is better??
Great articles! Reading them :) Thanks a lot!