| To: | REALbasic NUG <realbasic-nug at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: For/next and array ubounds: optimising performance |
| From: | Norman Palardy <npalardy at great-white-software dot com> |
| Date: | Thu, 17 May 2007 09:03:56 -0600 |
| Delivered-to: | listarchive at realsoftware dot com |
| Delivered-to: | realbasic-nug at lists dot realsoftware dot com |
| References: | <BAY107-DAV180C664B689445FD6BCCB093330 at phx dot gbl> |
On 17-May-07, at 7:14 AM, Daniel Stenning wrote:
> This makes me wonder: - Idoes Ubound use a method/function call to
> get the
> ubound value, or does the RB generate code to directly access a
> "property"
> or variable holding the internal array size ?.
It's a method call
Try
dim someArray(-1) as integer
someArray.append 1
someArray.append 2
for i as integer = 0 to ubound(someArray)
someArray.append i
next
> Naturally there would be some speed advantage to NOT using any
> function to
> get the size.
Except the size can change :)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|
| Previous by Date: | Re: For/next and array ubounds: optimising performance, Mathieu Langlois |
|---|---|
| Next by Date: | Re: For/next and array ubounds: optimising performance, Norman Palardy |
| Previous by Thread: | Re: For/next and array ubounds: optimising performance, Michael Diehr |
| Next by Thread: | Re: For/next and array ubounds: optimising performance, Charles Yeomans |
| Indexes: | [Date] [Thread] [Top] [All Lists] |