Plus42 for Windows - Why so slow?
|
12-14-2021, 07:45 AM
Post: #1
|
|||
|
|||
Plus42 for Windows - Why so slow?
00 { 15-Byte Prgm }
01 LBL "LOOP1" 02 LBL 01 03 1 04 + 05 GOTO 01 On my Windows machine (running Ryzen 5 5600G at 3.9GHz) I get 58,871,581 loops/min The Binary version not that much higher, 62,634,378 loops/min If I run the same bench on my lowly Android phone (with Snapdragon 780G), I get: 103,302,664 loops/min And yes, POFF is selected. Strange or not? |
|||
12-14-2021, 02:07 PM
Post: #2
|
|||
|
|||
RE: Plus42 for Windows - Why so slow?
Phones are pretty fast nowadays.
Also, the Windows version is a 32-bit executable, while the Android version is a mixed 32-bit / 64-bit apk. If your phone has a 64-bit CPU (and I think by now they all do), that would give it an extra edge. You could also try taking the time spent updating the display out of the equation, although it probably won't matter much: put an AVIEW or VIEW before your loop, so the display will remain static while the program is running. |
|||
12-14-2021, 04:51 PM
Post: #3
|
|||
|
|||
RE: Plus42 for Windows - Why so slow?
Adding an AVIEW before the loop boosted the result with 24% on the phone, but no effect on the desktop )
Yes, I was aware that the Windows version is 32-bit executable, but I was still surprised with the huge difference. |
|||
12-14-2021, 05:21 PM
Post: #4
|
|||
|
|||
RE: Plus42 for Windows - Why so slow?
Another factor could be the overhead caused by checking for events while running programs. The Windows version calls PeekMessage() after every program step, while the Android version will just keep running for up to 10 ms before looking for events. The behavior on Android was motivated by the large overhead caused by the native-to-Java calls, and that performance optimization may have ended up making it more efficient than the Windows version.
At some point I figured program execution was Fast Enoughâ„¢ and stopped paying attention to these kinds of differences... If you want a real sense of the speed differences, throw some actual calculations into your loop, my prediction is that they will take up a lot more time than the overhead for fetching and executing program steps! (Not that that will help the Windows version, because the 32-bit thing makes even more of a difference while crunching numbers.) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)