Calculator graphics drawing benchmark
|
09-09-2023, 10:19 PM
Post: #45
|
|||
|
|||
RE: Calculator graphics drawing benchmark
The Numworks graphing calculator, using the fill_rect() function in Python, has a possible 2nd place time - 0.308 seconds.
Because the Hitomezashi algorithm only uses horizontal and vertical lines, fill_rect() can be used, because horizontal and vertical lines are essentially flat rectangles. I used the monotonic() function to measure the time consumed. I had to add a sleep(0.25) delay before reading key presses at the end, because it seems that the program runs so quickly that when you press the OK key to run the program, if you're not quick enough, that same key press is read by the calculator to then display the start and finish times. Code: |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 13 Guest(s)