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