Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
M. performance
Message
From
24/04/2002 03:54:17
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
24/04/2002 03:01:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00647967
Message ID:
00648533
Views:
23
In VFP 7 I got 11.648 vs 36.306. But that ends up being 5 million iterations. It is interesting, though.
>>SNIP
>>>
>>>BTW the tests I could see saying not using m. is faster ignore the fact in fox almost all the time there might be a table in use :)
>>>Cetin
>>
>>Excellent point, Cetin. This is why I said to Nadya that it is onerous to do really "proper" tests of this nature.
>
>Right :) In Turkish we have a saying 'A dumb throws a stone in a well and 40 wise men try to take it out'. I seem to play dumb on this subject :) It's nearly impossible to make simple tests to say this is true or not. Many samples showed not using m. is faster AND they also showed difference was ignorable. OK here is another test from me showing using m. is faster AND difference is not ignorable (it's left to the coder to take which s/he wants) -really in theory w/o m. it should be slower too- :
>
>
>CLOSE all
>LOCAL fld,lnStart,dummy,ix,jx
>LOCAL ARRAY arrStruc[255,4], arrDummy[5]
>arrStruc = 0
>FOR ix = 1 TO 255
>	arrStruc[m.ix,1]='f'+TRANSFORM(m.ix)
>	arrStruc[m.ix,2]='L'
>	arrStruc[m.ix,3]=1
>endfor
>create cursor myCursor from array arrStruc
>
>lnStart = SECONDS()
>FOR ix=1 TO 1000000
> FOR jx=1 TO 5
>  arrDummy[m.jx] = m.ix*m.jx
> endfor
>ENDFOR
>? 'With m.',SECONDS()-lnStart
>
>lnStart = SECONDS()
>FOR ix=1 TO 1000000
> FOR jx=1 TO 5
>  arrDummy[jx] = ix*jx
> endfor
>ENDFOR
>? 'Without m.', SECONDS()-lnStart
>
>Now my results (Athlon 650Mhz, 192Mb,WinXP pro):
>VFP6 :
>11.59 - 11.92 (ignorable)
>VFP7 :
>11.95 - 37.01 (oops. both are slower than VFP6 results AND difference is not ignorable)
>Multiple runs change the results by less than 400 millisecs but the whole picture remains same.
>As long as this stands I'll accept the fine print documentation to be true :) Now after this test I'm more sure I read it somewhere as a workaround to slowness in VFP7 -I was starting to think it was a dream- :)
>Wish I could locate the doc.
>PS: CCed to all as per throwing the stone. Sorry.
>Cetin
Previous
Reply
Map
View

Click here to load this message in the networking platform