|
-
Jun 6th, 2010, 01:12 PM
#17
Re: Remove string is between "()" [help]
It likely also has to do with cache. Having a bunch of other code within the same procedure is going to generate more cache misses, which otherwise wouldn't be as numerable. This just adds to the 'noise'.
The results will be significantly different if you time 'all tests in one procedure' vs 'all the tests in their own procedures, called independently of one another'. This is what I've found true for every timing test I've ever done.
This is really important with actual 'functional code'. What I mean by that is a complete project that does something, rather than isolating your procedure(s) and timing them independently of their contextual use in the 'functional program' will give marked differences. When you isolate and time them individually they'll be faster.
For instance, timing the RemoveParentheses in context of the actual use of it. Like getting the string(say, from a database), calling RemoveParentheses, and then doing something with the result(like transmitting it over a socket, or saving it back to a database) vs simply calling RemoveParentheses by itself(isolated from context: no databases, no sockets). The first example will show that RemoveParenthese is taking longer than the latter scenario. The difference will be significant.
Software I use and highly recommend: Opera, Miranda IM, Peerblock, Winamp, Unlocker Assistant, JoyToKey, Virtual CloneDrive, Secunia PSI, ExplorerXP, GOM Player, Real Alternative, Quicktime Alternative,Sumatra PDF, and non-freeware: Photoshop and VB6( ).
My codebank: AllRGB, Rounded Rectangle(math), Binary Server, Buddy Paint, LoadPictureGDI+, System GUID/Volume Serial, HexToAsc, List all processes and their paths, quasiString matching
Strings(search, extraction, retrieval etc): Retrieve BBCode Link from HTML, RemoveBetween ()'s, strFindBetween(str1,str2), Insert text in HTML, HTML - GetSpanByID
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
|