Re: Checking the Milliseconds
I ran the original code on my MacBook Pro (16in 2019, 2.3GHx 8 core i9). Three quarters of the results were over 4000, almost 150 of those were 4400 or above. The highest value was 4493. Average: 3873 (rounded) Median: 4081 Standard Deviation: 611 (rounded) k ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
Hi. I rand this a few times on an iMac 3.2Ghz Intel I5 I got very consistent counts, averaging 2605, and most count deviating very little from that value Craig > On Apr 8, 2021, at 1:24 AM, Mark Wieder via use-livecode > wrote: > > On 4/7/21 9:38 PM, Tom Glod via use-livecode wrote: >> I hear you Sean ..it is pretty interesting These are like gritty >> details about the engine, and I love learning them. >> I did not expect less than a microsecond / operation, thats for sure. >> There are a few other operations I would like to test in this way. >> thanks for reminding me about the detail millisecond, this will help with >> accuracy. >> More on this in about a 2 couple weeks time. >> I am excited to bring something new to the LC developer community. :) > > But be wary of trusting the results of the long milliseconds on Windows. > Discussion here: > https://forums.livecode.com/viewtopic.php?f=66&t=34652 > > -- > Mark Wieder > ahsoftw...@gmail.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
On 4/7/21 9:38 PM, Tom Glod via use-livecode wrote: I hear you Sean ..it is pretty interesting These are like gritty details about the engine, and I love learning them. I did not expect less than a microsecond / operation, thats for sure. There are a few other operations I would like to test in this way. thanks for reminding me about the detail millisecond, this will help with accuracy. More on this in about a 2 couple weeks time. I am excited to bring something new to the LC developer community. :) But be wary of trusting the results of the long milliseconds on Windows. Discussion here: https://forums.livecode.com/viewtopic.php?f=66&t=34652 -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
I hear you Sean ..it is pretty interesting These are like gritty details about the engine, and I love learning them. I did not expect less than a microsecond / operation, thats for sure. There are a few other operations I would like to test in this way. thanks for reminding me about the detail millisecond, this will help with accuracy. More on this in about a 2 couple weeks time. I am excited to bring something new to the LC developer community. :) Cheers Tom On Wed, Apr 7, 2021 at 7:26 PM Sean Cole (Pi) via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Tom > > It is really interesting to see the results from this though. Tried it on > my various machines and got pretty much the same results as everyone else > consistently. It's amazing to see that in the region of 3000 loops occur in > the period of 1ms. which means we are perhaps getting 1 (lowish level) line > every 0.0001ms. Obviously heftier calls will take longer but it's a good > indicator. > > Here's a good check of accuracy (sorry for the formatting): > > local sMS > > on mouseUp >put the long millisec into sMS >send "checkTime" to me in 1 sec > end mouseUp > > on checkTime >put the long millisec - sMS > end checkTime > > // The long milliseconds gives you even more detail on the amount of time > elapsed. The variance is quite something. > > Sean > > On Wed, 7 Apr 2021 at 23:14, Tom Glod via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > Excellent ... Yes the 1st one was usually the one that was the lowest for > > me, for the reason you described. > > But you also cleared up the mysterious big jumps,I too now get a > consistent > > result. > > Thanks for chimming in > > > > > > On Wed, Apr 7, 2021 at 3:59 PM Niggemann, Bernd via use-livecode < > > use-livecode@lists.runrev.com> wrote: > > > > > I tried this and got pretty constant results except for maybe the > first > > > ten iterations. I figured if you just jump in with the milliseconds you > > > would not be at the "beginning" of the milliseconds and added a repeat > > loop > > > to mitigate that effect. Furthermore I appended the result to a > variable. > > > > > > --- > > > local last_known_millisecond > > > local queries = 0 > > > local report > > > local longSecs, tMs > > > > > > on mouseUp > > >lock screen > > >put empty into report > > > > > >--let it start at a flip of the ms > > >repeat > > > put the milliseconds into tMs > > > if char -1 of tMs is 0 then > > > exit repeat > > > end if > > >end repeat > > > > > >repeat 1000 times > > > put 0 into queries > > > put the long seconds into longSecs > > > put the milliseconds into last_known_millisecond > > > repeat forever > > > add 1 to queries > > > if the milliseconds = last_known_millisecond then > > > next repeat > > > else > > > exit repeat > > > end if > > > end repeat > > > put queries && (the long seconds - longSecs) * 1000 & cr after > > > report > > >end repeat > > > > > >unlock screen > > >put report > > > end mouseUp > > > -- > > > ___ > > > use-livecode mailing list > > > use-livecode@lists.runrev.com > > > Please visit this url to subscribe, unsubscribe and manage your > > > subscription preferences: > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > > > > -- > > Tom Glod > > Founder & Developer > > MakeShyft R.D.A (www.makeshyft.com) > > Mobile:647.562.9411 > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
Hi Tom It is really interesting to see the results from this though. Tried it on my various machines and got pretty much the same results as everyone else consistently. It's amazing to see that in the region of 3000 loops occur in the period of 1ms. which means we are perhaps getting 1 (lowish level) line every 0.0001ms. Obviously heftier calls will take longer but it's a good indicator. Here's a good check of accuracy (sorry for the formatting): local sMS on mouseUp put the long millisec into sMS send "checkTime" to me in 1 sec end mouseUp on checkTime put the long millisec - sMS end checkTime // The long milliseconds gives you even more detail on the amount of time elapsed. The variance is quite something. Sean On Wed, 7 Apr 2021 at 23:14, Tom Glod via use-livecode < use-livecode@lists.runrev.com> wrote: > Excellent ... Yes the 1st one was usually the one that was the lowest for > me, for the reason you described. > But you also cleared up the mysterious big jumps,I too now get a consistent > result. > Thanks for chimming in > > > On Wed, Apr 7, 2021 at 3:59 PM Niggemann, Bernd via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > I tried this and got pretty constant results except for maybe the first > > ten iterations. I figured if you just jump in with the milliseconds you > > would not be at the "beginning" of the milliseconds and added a repeat > loop > > to mitigate that effect. Furthermore I appended the result to a variable. > > > > --- > > local last_known_millisecond > > local queries = 0 > > local report > > local longSecs, tMs > > > > on mouseUp > >lock screen > >put empty into report > > > >--let it start at a flip of the ms > >repeat > > put the milliseconds into tMs > > if char -1 of tMs is 0 then > > exit repeat > > end if > >end repeat > > > >repeat 1000 times > > put 0 into queries > > put the long seconds into longSecs > > put the milliseconds into last_known_millisecond > > repeat forever > > add 1 to queries > > if the milliseconds = last_known_millisecond then > > next repeat > > else > > exit repeat > > end if > > end repeat > > put queries && (the long seconds - longSecs) * 1000 & cr after > > report > >end repeat > > > >unlock screen > >put report > > end mouseUp > > -- > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > -- > Tom Glod > Founder & Developer > MakeShyft R.D.A (www.makeshyft.com) > Mobile:647.562.9411 > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
Excellent ... Yes the 1st one was usually the one that was the lowest for me, for the reason you described. But you also cleared up the mysterious big jumps,I too now get a consistent result. Thanks for chimming in On Wed, Apr 7, 2021 at 3:59 PM Niggemann, Bernd via use-livecode < use-livecode@lists.runrev.com> wrote: > I tried this and got pretty constant results except for maybe the first > ten iterations. I figured if you just jump in with the milliseconds you > would not be at the "beginning" of the milliseconds and added a repeat loop > to mitigate that effect. Furthermore I appended the result to a variable. > > --- > local last_known_millisecond > local queries = 0 > local report > local longSecs, tMs > > on mouseUp >lock screen >put empty into report > >--let it start at a flip of the ms >repeat > put the milliseconds into tMs > if char -1 of tMs is 0 then > exit repeat > end if >end repeat > >repeat 1000 times > put 0 into queries > put the long seconds into longSecs > put the milliseconds into last_known_millisecond > repeat forever > add 1 to queries > if the milliseconds = last_known_millisecond then > next repeat > else > exit repeat > end if > end repeat > put queries && (the long seconds - longSecs) * 1000 & cr after > report >end repeat > >unlock screen >put report > end mouseUp > -- > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
I tried this and got pretty constant results except for maybe the first ten iterations. I figured if you just jump in with the milliseconds you would not be at the "beginning" of the milliseconds and added a repeat loop to mitigate that effect. Furthermore I appended the result to a variable. --- local last_known_millisecond local queries = 0 local report local longSecs, tMs on mouseUp lock screen put empty into report --let it start at a flip of the ms repeat put the milliseconds into tMs if char -1 of tMs is 0 then exit repeat end if end repeat repeat 1000 times put 0 into queries put the long seconds into longSecs put the milliseconds into last_known_millisecond repeat forever add 1 to queries if the milliseconds = last_known_millisecond then next repeat else exit repeat end if end repeat put queries && (the long seconds - longSecs) * 1000 & cr after report end repeat unlock screen put report end mouseUp -- ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
I think I realized the problem will test to confirm. I think the Max is actually what the avg should be. I think the writing to the variable is what increases the time between those queries. On Wed, Apr 7, 2021 at 12:58 PM Ralph DiMola via use-livecode < use-livecode@lists.runrev.com> wrote: > I added an average. i7-6700 3.4GHz 8 cores in the VM > > Run 1: > Max==>4586 > Min==>460 > Average==>3096.058 > > Run 2: > Max==>7573 > Min==>460 > Average==>3835.764743 > > Run 3: > Max==>7573 > Min==>728 > Average==>2947.388 > > Interesting > > Ralph DiMola > IT Director > Evergreen Information Services > rdim...@evergreeninfo.net > > > -Original Message- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On > Behalf > Of Tom Glod via use-livecode > Sent: Wednesday, April 07, 2021 12:03 PM > To: How to use LiveCode > Cc: Tom Glod > Subject: Checking the Milliseconds > > Hey peeps, > > I wanted to measure how many times the LC engine can check the milliseconds > count during each millisecond that passes. > > The results really surprised me, I thought it would be less, but I don't > know why really. > > Anyone want to take a guess? > > What is strange about my results, is that every few milliseconds the amount > of millisecond queries that occurs .. doubles. > > Why does this happen I wonder? > > Can someone double check if that happens on your CPU? I'm on WIndows 10 on > an i5 4570. > > Here is the code. > -- > > local last_known_millisecond > local queries = 0 > local report > > on mouseUp >lock screen >put empty into report >local x >repeat 1000 times > add 1 to x > put 0 into queries > put the milliseconds into last_known_millisecond > repeat forever > add 1 to queries > if the milliseconds = last_known_millisecond then > next repeat > else > exit repeat > end if > end repeat > put queries into line x of report >end repeat >unlock screen >put report > end mouseUp > > -- > Tom Glod > Founder & Developer > MakeShyft R.D.A (www.makeshyft.com) > Mobile:647.562.9411 > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
I closed everything down to make sure the core was being used as little as possible. It didn't make a difference in the counts or the variance I reported earlier. I guess its not important, but it sure is curious. I think it means the engine is busy with something most of the time, and once in a while it is less busy?. my numbers seem unusual compared to what you reported. :/ When I build a standalone, its the same kind of variance, just slower haha, My numbers look like this. 3122 3155 6405 3157 6404 3206 3203 3158 3246 3201 3190 3205 3202 6391 3135 6259 3144 3192 3201 3201 3201 6348 3193 6305 3200 3199 3204 3201 3283 6994 3582 7049 On Wed, Apr 7, 2021 at 12:34 PM Ralph DiMola via use-livecode < use-livecode@lists.runrev.com> wrote: > I scanned the results after it was done and got this: > > Max==>3959 > > Min==>1015 > > Ralph DiMola > IT Director > Evergreen Information Services > rdim...@evergreeninfo.net > > > -Original Message- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On > Behalf > Of Tom Glod via use-livecode > Sent: Wednesday, April 07, 2021 12:03 PM > To: How to use LiveCode > Cc: Tom Glod > Subject: Checking the Milliseconds > > Hey peeps, > > I wanted to measure how many times the LC engine can check the milliseconds > count during each millisecond that passes. > > The results really surprised me, I thought it would be less, but I don't > know why really. > > Anyone want to take a guess? > > What is strange about my results, is that every few milliseconds the amount > of millisecond queries that occurs .. doubles. > > Why does this happen I wonder? > > Can someone double check if that happens on your CPU? I'm on WIndows 10 on > an i5 4570. > > Here is the code. > -- > > local last_known_millisecond > local queries = 0 > local report > > on mouseUp >lock screen >put empty into report >local x >repeat 1000 times > add 1 to x > put 0 into queries > put the milliseconds into last_known_millisecond > repeat forever > add 1 to queries > if the milliseconds = last_known_millisecond then > next repeat > else > exit repeat > end if > end repeat > put queries into line x of report >end repeat >unlock screen >put report > end mouseUp > > -- > Tom Glod > Founder & Developer > MakeShyft R.D.A (www.makeshyft.com) > Mobile:647.562.9411 > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Checking the Milliseconds
I added an average. i7-6700 3.4GHz 8 cores in the VM Run 1: Max==>4586 Min==>460 Average==>3096.058 Run 2: Max==>7573 Min==>460 Average==>3835.764743 Run 3: Max==>7573 Min==>728 Average==>2947.388 Interesting Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Tom Glod via use-livecode Sent: Wednesday, April 07, 2021 12:03 PM To: How to use LiveCode Cc: Tom Glod Subject: Checking the Milliseconds Hey peeps, I wanted to measure how many times the LC engine can check the milliseconds count during each millisecond that passes. The results really surprised me, I thought it would be less, but I don't know why really. Anyone want to take a guess? What is strange about my results, is that every few milliseconds the amount of millisecond queries that occurs .. doubles. Why does this happen I wonder? Can someone double check if that happens on your CPU? I'm on WIndows 10 on an i5 4570. Here is the code. -- local last_known_millisecond local queries = 0 local report on mouseUp lock screen put empty into report local x repeat 1000 times add 1 to x put 0 into queries put the milliseconds into last_known_millisecond repeat forever add 1 to queries if the milliseconds = last_known_millisecond then next repeat else exit repeat end if end repeat put queries into line x of report end repeat unlock screen put report end mouseUp -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Checking the Milliseconds
I scanned the results after it was done and got this: Max==>3959 Min==>1015 Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Tom Glod via use-livecode Sent: Wednesday, April 07, 2021 12:03 PM To: How to use LiveCode Cc: Tom Glod Subject: Checking the Milliseconds Hey peeps, I wanted to measure how many times the LC engine can check the milliseconds count during each millisecond that passes. The results really surprised me, I thought it would be less, but I don't know why really. Anyone want to take a guess? What is strange about my results, is that every few milliseconds the amount of millisecond queries that occurs .. doubles. Why does this happen I wonder? Can someone double check if that happens on your CPU? I'm on WIndows 10 on an i5 4570. Here is the code. -- local last_known_millisecond local queries = 0 local report on mouseUp lock screen put empty into report local x repeat 1000 times add 1 to x put 0 into queries put the milliseconds into last_known_millisecond repeat forever add 1 to queries if the milliseconds = last_known_millisecond then next repeat else exit repeat end if end repeat put queries into line x of report end repeat unlock screen put report end mouseUp -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
Hmmm I averaged about 3500. but every so often 7000+. On Wed, Apr 7, 2021 at 12:17 PM Ralph DiMola via use-livecode < use-livecode@lists.runrev.com> wrote: > Here's the first few from LC 9.6.1 Win 10 Pro VM SSD > > 1473 > 3326 > 3397 > 3155 > 2442 > 3234 > 2292 > 3349 > 3380 > 3275 > 3259 > 3498 > 3300 > 3634 > 3462 > 3228 > 3896 > 3762 > 3197 > 3186 > 2188 > 1461 > 2716 > 3358 > 2940 > 2886 > 2614 > 2264 > 3038 > 3322 > 3305 > 3372 > 3395 > 3418 > 2579 > > > Ralph DiMola > IT Director > Evergreen Information Services > rdim...@evergreeninfo.net > > > -Original Message- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On > Behalf > Of Tom Glod via use-livecode > Sent: Wednesday, April 07, 2021 12:03 PM > To: How to use LiveCode > Cc: Tom Glod > Subject: Checking the Milliseconds > > Hey peeps, > > I wanted to measure how many times the LC engine can check the milliseconds > count during each millisecond that passes. > > The results really surprised me, I thought it would be less, but I don't > know why really. > > Anyone want to take a guess? > > What is strange about my results, is that every few milliseconds the amount > of millisecond queries that occurs .. doubles. > > Why does this happen I wonder? > > Can someone double check if that happens on your CPU? I'm on WIndows 10 on > an i5 4570. > > Here is the code. > -- > > local last_known_millisecond > local queries = 0 > local report > > on mouseUp >lock screen >put empty into report >local x >repeat 1000 times > add 1 to x > put 0 into queries > put the milliseconds into last_known_millisecond > repeat forever > add 1 to queries > if the milliseconds = last_known_millisecond then > next repeat > else > exit repeat > end if > end repeat > put queries into line x of report >end repeat >unlock screen >put report > end mouseUp > > -- > Tom Glod > Founder & Developer > MakeShyft R.D.A (www.makeshyft.com) > Mobile:647.562.9411 > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Checking the Milliseconds
Here's the first few from LC 9.6.1 Win 10 Pro VM SSD 1473 3326 3397 3155 2442 3234 2292 3349 3380 3275 3259 3498 3300 3634 3462 3228 3896 3762 3197 3186 2188 1461 2716 3358 2940 2886 2614 2264 3038 3322 3305 3372 3395 3418 2579 Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Tom Glod via use-livecode Sent: Wednesday, April 07, 2021 12:03 PM To: How to use LiveCode Cc: Tom Glod Subject: Checking the Milliseconds Hey peeps, I wanted to measure how many times the LC engine can check the milliseconds count during each millisecond that passes. The results really surprised me, I thought it would be less, but I don't know why really. Anyone want to take a guess? What is strange about my results, is that every few milliseconds the amount of millisecond queries that occurs .. doubles. Why does this happen I wonder? Can someone double check if that happens on your CPU? I'm on WIndows 10 on an i5 4570. Here is the code. -- local last_known_millisecond local queries = 0 local report on mouseUp lock screen put empty into report local x repeat 1000 times add 1 to x put 0 into queries put the milliseconds into last_known_millisecond repeat forever add 1 to queries if the milliseconds = last_known_millisecond then next repeat else exit repeat end if end repeat put queries into line x of report end repeat unlock screen put report end mouseUp -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Checking the Milliseconds
It averages around 3850 and 3900 every time I try. However, when I try to run the test 1 times the average goes down to just above 3600. BigSur on Xeon W 3GHz. Best regards Tore Nilsen > 7. apr. 2021 kl. 18:03 skrev Tom Glod via use-livecode > : > > Hey peeps, > > I wanted to measure how many times the LC engine can check the milliseconds > count during each millisecond that passes. > > The results really surprised me, I thought it would be less, but I don't > know why really. > > Anyone want to take a guess? > > What is strange about my results, is that every few milliseconds the amount > of millisecond queries that occurs .. doubles. > > Why does this happen I wonder? > > Can someone double check if that happens on your CPU? I'm on WIndows 10 on > an i5 4570. > > Here is the code. > -- > > local last_known_millisecond > local queries = 0 > local report > > on mouseUp > lock screen > put empty into report > local x > repeat 1000 times > add 1 to x > put 0 into queries > put the milliseconds into last_known_millisecond > repeat forever > add 1 to queries > if the milliseconds = last_known_millisecond then >next repeat > else >exit repeat > end if > end repeat > put queries into line x of report > end repeat > unlock screen > put report > end mouseUp > > -- > Tom Glod > Founder & Developer > MakeShyft R.D.A (www.makeshyft.com) > Mobile:647.562.9411 > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Checking the Milliseconds
Hey peeps, I wanted to measure how many times the LC engine can check the milliseconds count during each millisecond that passes. The results really surprised me, I thought it would be less, but I don't know why really. Anyone want to take a guess? What is strange about my results, is that every few milliseconds the amount of millisecond queries that occurs .. doubles. Why does this happen I wonder? Can someone double check if that happens on your CPU? I'm on WIndows 10 on an i5 4570. Here is the code. -- local last_known_millisecond local queries = 0 local report on mouseUp lock screen put empty into report local x repeat 1000 times add 1 to x put 0 into queries put the milliseconds into last_known_millisecond repeat forever add 1 to queries if the milliseconds = last_known_millisecond then next repeat else exit repeat end if end repeat put queries into line x of report end repeat unlock screen put report end mouseUp -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode