realbasic-nug
[Top] [All Lists]

Re: Performance and faster idioms

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Performance and faster idioms
From: Ronald Vogelaar <enter at rovosoft dot com>
Date: Mon, 28 Feb 2005 22:20:52 +0100
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <BE488844 dot 1AD1F%maxduepuntozero at yahoo dot it> <df61ece54e9a636c0043fa7cc1c22abf at mac dot com> <0A92E9E0-89AF-11D9-B0F1-000A957CB4CC at desuetude dot com> <42238428 dot 8060205 at rovosoft dot com> <a06200720be4937f4eec5 at [10 dot 10 dot 13 dot 4]>
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>

<Prev in Thread] Current Thread [Next in Thread>