FYI: writing to and reading from fields much faster than locals, globals or custom properties

Richard Gaskin ambassador at fourthworld.com
Thu Feb 18 14:21:03 EST 2010


At 03:09:01 CST 2010 Kay C Lan wrote:

>> On Feb 17, 2010, at 8:10 PM, Josh Mellicker wrote:
>>
> Rev reads and
>>> writes to fields super fast!
>>
>
> Clearly Richard 'the Benchmark King' Gaskin is asleep right now, but
> when he wakes I'm sure he'll have the figures.

Maybe that should be "Benchmark Obsessive". :)

True, I was sleeping at 1AM PST, but when I got up this morning I found 
this intriguing enough to pull out one of my old test stacks.  In fact, 
while I was at it I took some notes for an article on benchmarking I've 
been itching to write and posted it to revJournal:

Benchmarking Performance in RevTalk
<http://www.revjournal.com/tutorials/benchmarking-revtalk.html>

Using this exercise of data access as an example, the code, results, and 
downloadable stack are in this section:
<http://www.revjournal.com/tutorials/benchmarking-revtalk.html#example>

The bottom line in my tests reflect Dr. Raney's comments that Jacque noted:

     Number of iterations for read/write access: 5000
     LockScreen = true
     LockMessages = true

     Results:
     Visible field, current card:  22
     Hidden field, current card:  23
     Visible field, unopened card:  13
     Hidden field, unopened card:  14
     Custom property:  5
     Global variable:  1
     Local variable:  2


     Number of iterations for read/write access: 5000
     LockScreen = false
     LockMessages = false

     Results:
     Visible field, current card:  3353
     Hidden field, current card:  4823
     Visible field, unopened card:  13
     Hidden field, unopened card:  14
     Custom property:  13
     Global variable:  2
     Local variable:  1


One of the challenges in attempting to determine performance within a 
complex system is that there's so much going on that can affect things.

Benchmarking specific elements in isolation removes most of those 
interactions, usually leading to more repeatable results.

--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv



More information about the use-livecode mailing list