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: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Mon, 28 Feb 2005 15:06:57 -0600
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>
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.

The StringUtils module has this and other functions which might interest you: <http://www.strout.net/info/coding/rb/>.

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).

--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
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>