Mike Yearwood
Toronto, Ontario, Canada
>
>Notice that the object approaches are not even close to each other in either run. I'm surprised that the WITH is so much slower. I'm happy the memvar beats the literal, how often do we get to search for a literal?
Perhaps slower times for the WITH has something to do with needing to locate the context for the property? I'm guessing that it (the p-engine) needs to backtrace through levels of stack frames in the control stack whenever you access through a WITH to locate the object context. So I'd figure that you'd see a difference in execution speed if you changed
WITH object-ref
loop-construct
(statements with dot-references to properties and methods)
end-loop-construct
ENDWITH
to something like
oRef = object-ref
loop-construct
(statements with properties and methods through oRef)
end-loop-construct
oRef = .NULL. && unlink reference
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only