Mithrandir Posted January 18, 2011 Share Posted January 18, 2011 I want to test whether using StringSplit or _StringExplode is faster but on initial tests if I use _Timer_Init and _Timer_Diff it shows _StringExplode is faster (0.17 miliseconds against 0.20 of StringSplit) but if I use TimerInit and TimerDiff it shows that StringSplit is faster. Which of the two UDFs is more accurate? Or should I take an average? Help with SOAP message!! Link to comment Share on other sites More sharing options...
JohnOne Posted January 18, 2011 Share Posted January 18, 2011 I cannot see you getting those same results every time, and .03 milliseconds it not really much to worry about. Personally, I always use the native built in functions where I can. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Mithrandir Posted January 18, 2011 Author Share Posted January 18, 2011 (edited) I cannot see you getting those same results every time, and .03 milliseconds it not really much to worry about.Personally, I always use the native built in functions where I can.Ok, actually my purpose is not the difference between stringsplit and stringexplode, what I would like to know is the difference of time between using a regular expression to extract substrings from a string or using stringsplit and then travel in the array to take the value that I want. And since with a simple comparison timerdiff and _timer_diff showed contradictory results, I didn't know what to use. Anyway I can take both and make an average I suppose. Edited January 18, 2011 by Mithrandir Help with SOAP message!! Link to comment Share on other sites More sharing options...
MvGulik Posted January 18, 2011 Share Posted January 18, 2011 (edited) "Which is more precise? TimerDiff or _Timer_Diff?" TimerDiff(), as it has less native autoit code overhead to contend with. But considering TimerInit() and TimerDiff() are directly related to the CPU tick frequency ... your generally better off running a longer timed/looped test. In which case it really don't matter if you use the native TimerDiff() or the Timer.UDF _Timer_Diff(). (TimerInit(), if your really like to go nuts on the subject ... ) Edited January 18, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now