Joseph J. Strout wrote:
At 9:50 PM +0100 2/28/05, Ronald Vogelaar wrote:
On OSX I found it on average to be about 25% faster than CountFields,
on Windows(XP) however, it is on average 300% faster.
Yes, because you're using the binary version of InStr instead of the
text-based one.
To be honest, I had expected the difference to be greater.
The StringUtils module has this and other functions which might
interest you: <http://www.strout.net/info/coding/rb/>.
Thanks. I just downloaded it. I'll have a look at it.
Interesting sidenote: just for laughs I also tested ElfDataFields
from Theo's ElfData plugin. It is on average 100 times faster than
countfields.
But it's not doing the same thing either (I suspect that it's also
doing a binary search, though I haven't looked into it in quite a while).
Well I'm an opportunist in this regard. If it does the job faster than
anything else, I don't really care how it gets the result as long as
it's the result I want.
Ronald Vogelaar
http://www.rovosoft.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|