Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mdot science
Message
From
17/06/2021 06:49:51
 
 
To
17/06/2021 04:43:56
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01681249
Message ID:
01681285
Views:
62
I think it is not just looking at the percentage improvement. If 10% represents a few seconds, so what? But if 10% represents (for example) a few hours ...


>So this is less then 10%, in other words of no importance.
>
>>Hi,
>>
>>One code, one PC, different VFP versions:
>>
>>VFP 5
>>
>>no mdot          0.327999999997701
>>mdot          0.343000000000757
>>10,000,000 loop no cursor                  -4
>>string no mdot          0.000000000000000
>>string mdot          0.000000000000000
>>string***************************
>>Created cursor.
>>no mdot          0.344000000000960
>>mdot          0.344000000000960
>>loop with cursor          0.000000000000000
>>
>>
>>VFP 6
>>
>>no mdot          0,561999999998079
>>mdot          0,547000000002299
>>10,000,000 loop no cursor                   3
>>string no mdot          0,000000000000000
>>string mdot          0,000000000000000
>>string **************************
>>Created cursor.
>>no mdot          0,562999999998283
>>mdot          0,530999999999040
>>loop with cursor          6,026365348267642
>>
>>
>>
>>VFP 7
>>
>>no mdot          0,473999999998341
>>mdot          0,469000000000960
>>10,000,000 loop no cursor                   1
>>string no mdot          0,000000000000000
>>string mdot          0,000000000000000
>>string***************************
>>Created cursor.
>>no mdot          1,264999999999418
>>mdot          0,469000000000960
>>loop with cursor        169,722814498257500
>>
>>
>>VFP 8
>>
>>no mdot          0.545999999998458
>>mdot          0.546999999998661
>>10,000,000 loop no cursor                   0
>>string no mdot          0.000000000000000
>>string mdot          0.000000000000000
>>string***************************
>>Created cursor.
>>no mdot          2.001000000000204
>>mdot          0.547000000002299
>>loop with cursor        265.813528334879900
>>
>>
>>VFP 9
>>
>>no mdot          0,563000000001921
>>mdot          0,561999999998079
>>10,000,000 loop no cursor                   0
>>string no mdot          0,000000000000000
>>string mdot          0,000000000000000
>>string***************************
>>Created cursor.
>>no mdot          2,031999999999243
>>mdot          0,578000000001339
>>loop with cursor        251,557093424660300
>>
>>
>>
>>VFP A 32
>>
>>no mdot          0,593000000000757
>>mdot          0,610000000000582
>>10,000,000 loop no cursor                  -3
>>string no mdot          0,000000000000000
>>string mdot          0,000000000000000
>>string***************************
>>Created cursor.
>>no mdot          2,030999999999040
>>mdot          0,594000000000960
>>loop with cursor        241,919191918477400
>>
>>
>>VFP A 64
>>
>>no mdot          0,735000000000582
>>mdot          0,765999999999622
>>10,000,000 loop no cursor                  -4
>>string no mdot          0,000000000000000
>>string mdot          0,000000000000000
>>string***************************
>>Created cursor.
>>no mdot          2,171999999998661
>>mdot          0,764999999999418
>>loop with cursor        183,921568627492000
>>
>>
>>
>>MartinaJ
>>
>>>I am totally convinced the average programmer knows little about science. It is not taught the way medical professionals are taught science. Having worked with actual world-renowned medical science professors that were department heads, I got a lot of on the job training to use science while coding.
>>>
>>>Donald Knuth is a hero to some idiots quoting his over-used-misunderstood Optimization is the root of all evil. How many of you read the entire article - and understood it?
>>>
>>>https://pic.plover.com/knuth-GOTO.pdf
>>>
>>>He also called out crappy coders:
>>>
>>>"The conventional wisdom shared by many of today's software engineers (ya like there are a lot of those) calls for ignoring efficiency in the small; but I believe this is simply an overreaction to the abuses they see being practiced by penny-wise-and-pound-foolish programmers, who can't debug or maintain their "optimized" programs." That sounds all too familiar from what I've seen.
>>>
>>>He goes on "In established engineering disciplines a 12% improvement EASILY OBTAINED, is never considered marginal (except by crappy coders); and I believe the same viewpoint should prevail in software engineering."
>>>
>>>I am not penny-wise-pound-foolish. I make code faster, cleaner and better every time.
>>>
>>>Refer back to Knuth - a 12% increase easily obtained is never considered marginal.
>>>
>>>Using the following code in VFP9 I got a 227% increase simply using mdot with a cursor in place. That is scientific measurement. It is required to magnify the sample to get results. That is scientific. It is fact. The look of the code with or without mdot is IRRELEVANT except to the most immature.
>>>
>>>So, Knuth supports a 12%. I'm certain a 227% would be a big deal, especially adding the safety factor.
>>>
>>>The reason for science is to prevent a bunch of morons from attacking things to the betterment of all. Everytime I post anything about mdot, and for that matter anything at all a particular bully attacks what I say. Too bad the blocking feature here does not make such bullies completely invisible. The bullies and their supporters can go pound sand.
>>>
>>>
clear
>>>use in select("c_mdot")
>>>set decimals to 15
>>>
>>>g=10000000
>>>lcString="create cursor c_Mdot ("
>>>a1=seconds()
>>>for x = 1 to g
>>>	c=x
>>>endfor x
>>>a1=seconds()-a1
>>>?"no mdot",a1
>>>
>>>lcString="create cursor c_Mdot ("
>>>a2=seconds()
>>>for x = 1 to g
>>>	c=m.x
>>>endfor x
>>>a2=seconds()-a2
>>>?"mdot",a2
>>>x=a1-a2
>>>?"10,000,000 loop no cursor",(x/a2)*100
>>>
>>>g=254
>>>a1=seconds()
>>>x=1
>>>lcString="create cursor c_Mdot (c"+alltrim(str(x))+" char (1)"
>>>for x = 2 to g
>>>	lcString=lcString+",c"+alltrim(str(x))+" char (1)"
>>>endfor x
>>>lcString=lcString+")"
>>>a1=seconds()-a1
>>>?"string no mdot",a1
>>>
>>>a2=seconds()
>>>x=1
>>>lcString="create cursor c_Mdot (c"+alltrim(str(m.x))+" char (1)"
>>>for x = 2 to g
>>>	lcString=m.lcString+",c"+alltrim(str(m.x))+" char (1)"
>>>endfor x
>>>lcString=m.lcString+")"
>>>a2=seconds()-m.a2
>>>?"string mdot",m.a2
>>>
>>>x=a1-a2
>>>?"string",(x/a2)*100
>>>
>>>&lcString
>>>?"Created cursor."
>>>g=10000000
>>>a1=seconds()
>>>for x = 1 to g
>>>	c=x
>>>endfor x
>>>a1=seconds()-a1
>>>?"no mdot",m.a1
>>>
>>>a2=seconds()
>>>for x = 1 to g
>>>	c=m.x
>>>endfor x
>>>a2=seconds()-a2
>>>?"mdot",m.a2
>>>
>>>x=a1-a2
>>>?"loop with cursor",(x/a2)*100
>>>
>>>set decimals to 2
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform