Another newb question - How to you clear a field?
J. Landman Gay
jacque at hyperactivesw.com
Fri May 8 17:55:34 EDT 2009
Dave Cragg wrote:
>
> On 8 May 2009, at 20:13, J. Landman Gay wrote:
>
>> Scott Rossi wrote:
>>> Recently, J. Landman Gay wrote:
>>>> if literal names are not quoted, the engine takes twice as long to
>>>> execute the
>>>> statement because of the additional lookup.
>>> Jacque, is this really true?
>>
>> I confess I made up the "twice as long" part, I don't really have any
>> hard numbers on the increase.
>
> I do. :-)
>
> I've held the same belief as yourself. It looks like we're wrong. On my
> machine (an intel mac)), 100,000 accesses of a field (get field
> whatever) takes about 95ms for both quoted and unquoted field names.
> (The field contains about 140 characters) Actually, on average, using a
> quoted name takes about 2ms longer (for 100,000 accesses). Accessing the
> field by its number takes about 85 ms. And by its ID takes about 80ms.
Okay, so you made me test. :) I get approximately what you do, but it
bounces around so much it's hard to say whether one is faster than the
other. Sometimes the quoted reference is a little faster, sometimes a
hair slower, which makes me think there is hardly any difference at all
in the long run. Whaddya know. Maybe everything else I said is wrong too.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list