Which is faster...

Craig Newman craig at starfirelighting.com
Thu Dec 14 17:25:32 EST 2023


Anything to distract me from my day job.

An array with 100,000 elements and a variable with 100,00 lines take the same time to place into a field.

The only time that took a while was building them. Each took 10 milliseconds.

Craig

> On Dec 14, 2023, at 4:55 PM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Bob,
> 
> Thank you. I could script a timing test but sometime just asking the list or forums is easier. You asnwered well before I would have had the time to write a basic test script. Thanks!
> 
> 
> On 12/14/2023 4:45 PM, Bob Sneidar via use-livecode wrote:
>> I think the confusion comes from thinking so much of a stack as an object that has substance, when really all the properties are places in memory just like a memory variable is. I asked this some years back and the answer I got was that there is no appreciable difference.
>> 
>> One could always devise a test though…
>> 
>> Bob S
>> 
>> 
>> On Dec 14, 2023, at 1:22 PM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> Which is faster or more efficient (from an engine performance perspective)?
>> 
>> To retrieve an array from a property?
>> As in:
>> command someHandler -- in an objects script
>>   get the cMyArray from me -- cMyArray is some multi-dimensional array
>>   ...
>> end someHandler
>> 
>> OR
>> 
>> To retrieve an array from a script local variable?
>> As in:
>> local sMyArray -- script local variable in some objects script
>> 
>> command someHandler -- in an objects script
>>   get sMyArray
>>   ...
>> end someHandler
>> 
>> Anyone know?
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list