Olaf,
You can't test m. this way. When it's left operand of an assignment it's already a memory variable. You can't do assignment to field variable this way. Check = operator in help.
Check Message #
646222 and read whole threads:
Thread #
647967 Thread #
649450 It's not the number of workareas in use that matters but the field count of table/cursor in current area.
If you're sick of optimization needs then you don't need to check anything.
Cetin
>>You used VFP9 and you think m. is not important!
>
>Another very simple testrun:
>
>
>LOCAL lnCount, lnMemvar, tt
>
>m.tt=SECONDS()
>FOR m.lnCount=1 TO 1000000
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
> m.lnMemvar = 1
>ENDFOR m.lnCount
>?SECONDS()-m.tt
>
>I put so much lines into the loop to lower the overhead of the loop itself.
>
>This took 13.4 seconds on my old Athlon A 600 Mhz CPU machine. And it took 13.1 secs without m. I'm sick of such optimization tips. I'm also not a vfp novice.
>
>Set Talk On during operations scanning through tables, replacing single records or even just creating an index causes messages being written to the status bar for each replace. That takes up time! See now, why it is right to say that this matters more than using or not using m.? I'm open to any test script you can show me that proves the speed up m. could cause. Maybe it's dependant on how many workareas are used.
>
>It's true that 10 million records may make much of a difference compared to 3 millions, okay. I put the record number up and saw a serious dropdown in performance, the time needed doesn't scale linearly. But well, this makes the question what is faster a question of the amount of data and how it's spread. Normally you would have the data ordered by the dates, as it grows in time. Both SQL and xBase would profit of that!
>
>Bye, Olaf.