realbasic-nug
[Top] [All Lists]

Re: For/next and array ubounds: optimising performance

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:08:29 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <BAY107-DAV2B6C18E84C64A6300D58993330 at phx dot gbl>
On 17-May-07, at 8:45 AM, Daniel Stenning wrote:

> Are you saying that RB Ubound does an iterating  count of the  
> number of
> elements each time ??

Yes
A static counter that could be quickly accessed _may_ exist
That's internal and we don't know
But ubound is a function call each time

>  I would have thought that each RB array has an internal count  
> "property"
> that only gets modified as elements are added or removed, and this  
> property
> is what gets queried each time Ubound is called.  I might be wrong  
> but that
> would seem the most efficient thing to do - at the cost of a single  
> integer.

It may actually have that
We don't know how it is implemented
But ubound is a call
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


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