Terry R. Schussler wrote:

> One of the results from the test was that dot notation
> operations *can* be slower.

Part of that is because bracket access (object[#prop]) is slower that dot
access (object.prop)

In your on getFromPropListDotNotationStyle handler you use bracket access

name = proplist[#pName]
address = proplist[#pAddress]
city = proplist[#pCity]
state = proplist[#pState]
zip = proplist[#pZip]
    
but if you change that to dot access the code speeds up considerably.

name = proplist.pName
address = proplist.pAddress
city = proplist.pCity
state = proplist.pState
zip = proplist.pZip


Using your original code I got times of (unsorted: 386, sorted: 408) and
using dot access I got (unsorted: 115 and sorted: 382)

The unsorted list access was dramatically faster using dot access as opposed
to bracket access.

And, similarly, the times for accessing the script object and script
instance decreased as well

type                                                  time
script object bracket                      145
script object dot                             111

script instance bracket                  154
script instance dot                         108



-- 

Every cloud has its silver lining, and lightning kills hundreds of
people each year who are trying to find it.



email: [EMAIL PROTECTED]
web: http://www.pixelgeek.com/


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to