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: "Mathieu Langlois" <realsoftlists at gmail dot com>
Date: Thu, 17 May 2007 11:01:51 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <94527C3C-57F0-4639-8DAB-C8987BB8509B at sentman dot com> <BAY107-DAV2B6C18E84C64A6300D58993330 at phx dot gbl>
They probably have an internal count property, but you still have
overhead for calling a method.  If they did a full iteration count
each time, I suspect the time difference would be much greater!

Math

On 5/17/07, Daniel Stenning <d0stenning at msn dot com> wrote:
> Are you saying that RB Ubound does an iterating  count of the number of
> elements 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.
_______________________________________________
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>