Calculator graphics drawing benchmark
|
01-23-2022, 06:24 PM
(This post was last modified: 12-22-2023 01:30 AM by robve.)
Post: #1
|
|||
|
|||
Calculator graphics drawing benchmark
The performance of the casioplot Python module turns out to be quite good (see New Casio fx-9860 GIII model), but not as fast as HP Prime HPPL. So I was wondering how both stack up against the performance of other calculators, including vintage calculators.
Disclaimer: please don't consider this as a serious attempt to compare drawing speeds of graphing calculators. However, the results of the tests were interesting enough to share. Perhaps some may find this useful or would like to contribute additional calculators and programs to include in the list. Why this benchmark? Pixel line drawing is probably the most widely supported operation on graphing calculators. This benchmark measures the performance of pixel line drawing, as used to draw space-filling curves and some type of fractals. Why Hitomezashi patterns? The Hitomezashi pattern algorithm does not require trigonometric functions or other costly calculations. It does not require memory (arrays) and does not involve recursion. Hence we measure the drawing speed of this real (and pretty) algorithm, as opposed to just drawing some lines. What it does not: this benchmark does NOT measure Y=f(X) function graphing performance or 2D and 3D function plotting performance. What's allowed? Any point and line drawing commands, including dashed lines if that speeds up the algorithm. Pixel drawing commands are typically faster than graphing display annotation point and line commands. Buffering/blitting/GROBbing the entire image to screen is fine. The image should fill the screen (note that larger pattern areas typically result in better performance.) The screen size of the device should be at least 17x17 pixels (4S+1 for S=4), but that would be ridiculously small for a graphing calculator. Emulators and turbo CPU hacks are not permitted. The program for each calculator is listed at the bottom of this post in the large code block. The programs are optimized. If anyone finds a faster way to run these programs, then let us know. Performance index = screen size of the pattern drawn / running time. For example, performance=1000 for a 100x100 screen filled in 10 seconds by a S=4 Hitomezashi pattern. The higher the performance index, the faster the calculator's (pixel) line drawing speed. The actual drawable graphics screen is often smaller than the display resolution of the device (e.g. to display buttons in addition to the drawable screen). The drawing screen size measured in pixels is used for the index, not the device's display size. Calculators ranked from best to worst performance index: 1. HP Prime G2 program: Python screen: 320x240 time: 0.00197s with GROB blitting, 0.014s without blitting performance: 38,984,772 with GROB blitting, 5,485,714 without blitting 2. HP Prime G2 program: HPPL screen: 320x240 time: 0.15s (100x loop takes 15s) performance: 512,000 3. DM42 program: RPN with AGRAPH screen: 400x200 time: 3.55s performance: 27,042 4. Ti-nspire cx II cas program: Ti Basic with UseBuffer/PaintBuffer screen: 318x210 time: 2.65s performance: 25,200 5. Casio fx-CG50 program: Python screen: 380x188 time: 4.7s performance: 15,200 6. HP 50g program: System RPL screen: 131x80 time: 1.46s performance: 7,178 7. Sharp OZ-9500 with OZ-8B03 BASIC card program: BASIC screen: 240x64 time: 2.5s performance: 6,144 8. Sharp PC-G850VS program: C screen: 144x48 time: 1.3s performance: 5,317 9. SwissMicros DM42 program: RPN screen: 400x240 time: 18.7s performance: 5,134 10. Sharp OZ-9600II with OZ-707 BASIC card program: BASIC screen: 96x64 (to match OZ-7000) time: 1.25s performance: 4,915 11. Sharp PC-G850VS program: BASIC screen: 144x48 time: 2s performance: 3,456 12. Sharp PC-E500S program: Forth500 screen: 240x32 time: 2.4s performance: 3,200 13. Amstrad NC100 program: BBC BASIC screen: 480x64 time: 9.80s performance: 3,135 14. Sharp OZ-7600 with BASIC card program: BASIC screen: 96x64 time: 2.5s performance: 2,458 15. Sharp PC-E500(S) program: BASIC screen: 240x32 time: 3.7s performance: 2,076 16. TRS-80 Model 100 (not a calculator, but runs on AA batteries so that makes it count...) program: BASIC screen: 240x64 time: 10.3s performance: 1,491 17. Sharp PC-1600 program: BASIC screen: 155x32 time: 3.48s performance: 1,425 18. HP 50g program: User RPL screen: 131x80 time: 13.5s performance: 776 19. Sharp EL-9900 program: BASIC screen: 128x64 (132x64 usable, but ignored) time: 13s performance: 630 20. Ti Voyage 200 program: Ti BASIC screen: 240x102 time: 40.8s performance: 600 21. Sharp PC-1360 program: BASIC screen: 150x32 time: 12.8s performance: 375 22. HP 28S program: RPN screen: 137x32 time: 14s performance: 313 23. Casio fx-7500G program: Casio BASIC screen: 96x64 time: 29s performance: 212 24. Casio fx-9860G Slim program: Casio BASIC screen: 128x64 time: 65.3s performance: 125 25. Sharp EL-9300C program: Sharp BASIC screen: 96x64 time: 53s performance: 116 26. Casio fx-7000G program: Casio BASIC screen: 96x64 time: 60s performance: 102 27. Casio fx-CG50 program: Casio BASIC screen: 380x188 time: 1470s (24.5 minutes) performance: 49 28. Sharp EL-5200/EL-9000 program: AER-II screen: 96x32 time: 72.5s performance: 42 29. HP 41C with HP82240A printer connected via HP82242A IR module program: RPN screen: 164x160 time: 725s (12 minutes and 5 seconds) performance: 36 Code:
"I count on old friends to remain rational" |
|||
01-23-2022, 10:09 PM
Post: #2
|
|||
|
|||
RE: Calculator graphics drawing benchmark
It is very interesting that the same calculator (Casio fx-CG50) scored both the second highest (using Python) and the lowest (using Casio BASIC) performance in your testing. Is seems that Casio BASIC is particularly slow at drawing graphics.
|
|||
01-24-2022, 02:29 AM
Post: #3
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-23-2022 10:09 PM)Steve Simpkin Wrote: It is very interesting that the same calculator (Casio fx-CG50) scored both the second highest (using Python) and the lowest (using Casio BASIC) performance in your testing. Is seems that Casio BASIC is particularly slow at drawing graphics. Indeed. The Python code makes a really big difference for the Casio fx-CG50. The BASIC version uses ViewWindow and the graphing Plot and Line commands. Apparently there are no pixel-based Plot and Line in Basic. Interestingly, the older fx-9860G and fx-7000G run faster with very similar Casio Basic programs. The Casio fx-CG50 Python has no Line command, so one has to write a Line function and perhaps other functions to provide the necessary scaffolding to produce more useful graphics. I wonder what the HP Prime Python performance is for this benchmark? I don't have Python on my HP Prime, so hopefully someone comes up with a Python version to run the benchmark. - Rob "I count on old friends to remain rational" |
|||
01-24-2022, 11:34 AM
Post: #4
|
|||
|
|||
RE: Calculator graphics drawing benchmark
I believe there's an error in the Casio fx-CG50 Python code:
Code: for x in range(0,380,s): the inner loop should be 'for y in'. Well, the DM42 is also a graphing calculator, is it not? A quick hack: Code: 00 { 161-Byte Prgm } using the following 'LINE' program (a bit of overkill as it accepts both real and complex input, and works in RECT and POLAR modes) Code: 00 { 76-Byte Prgm } drawing in GrMod=3 (400x240), S=8 runs in 7 seconds. (on USB power) the number of pixels drawn is 15000, so performance index 2143 Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
01-24-2022, 02:08 PM
Post: #5
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-24-2022 11:34 AM)Werner Wrote: I believe there's an error in the Casio fx-CG50 Python code: Thanks Werner for identifying the typo. I've corrected it in the listing. (01-24-2022 11:34 AM)Werner Wrote: Well, the DM42 is also a graphing calculator, is it not? What is the DM42 running time for S=4? I know the lines are probably tiny on the screen, but S=4 was used by all other calculator runs. S should be fixed to 4 for accurate ranking comparisons. For larger S fewer pixels are drawn (S=8 boosts the performance about 4 times, you see...). - Rob "I count on old friends to remain rational" |
|||
01-24-2022, 02:41 PM
Post: #6
|
|||
|
|||
RE: Calculator graphics drawing benchmark
Hi Rob,
with S=4 it takes 18.7 seconds for 36000 pixels, so pi=1925 I thought S=8 was also ok as eg the Casio fx-CG50 Casio Basic code has it hardcoded. Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
01-24-2022, 03:02 PM
Post: #7
|
|||
|
|||
RE: Calculator graphics drawing benchmark
Werner, it is really nice to include the DM42 code and I recognize and appreciate the effort you put into this code and the DM42 LINE program.
(01-24-2022 02:41 PM)Werner Wrote: with S=4 it takes 18.7 seconds for 36000 pixels, so pi=1925 I ran the test with S=4 so the score for the Casio fx-CG50 Basic version is correct. The S=8 is incorrect in the listing (thanks for pointing that out). I had tried S=8 earlier because the S=4 run took forever (24.5 minutes!) - Rob "I count on old friends to remain rational" |
|||
01-24-2022, 03:28 PM
Post: #8
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-24-2022 02:41 PM)Werner Wrote: with S=4 it takes 18.7 seconds for 36000 pixels, so pi=1925 SwissMicros DM42 program: RPN screen: 400x240 time: 18.7s performance: 5134 Note that the graphics drawing screen size 400x240 is to be used with the performance index. This is the size of the drawable pixel area. My rationale for using a pattern like this is that it has some randomization and doesn't fill the whole screen as a solid blob. A highly predictable pattern or a gray/black blob can be much more economically produced, which is not a good candidate for a benchmark to make the benchmark generalizable and predictable for the drawing speeds of other pixel/line patterns. The RPN code has RCL "ResX" and RCL "ResY" which I assume return 400 and 240, respectively? - Rob "I count on old friends to remain rational" |
|||
01-24-2022, 04:37 PM
Post: #9
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-24-2022 03:28 PM)robve Wrote: SwissMicros DM42 I believe it said 'written pixels' before ;-) Quote:The RPN code has RCL "ResX" and RCL "ResY" which I assume return 400 and 240, respectively? In GrMod=3, yes. In GrMod=2 ResX and ResY are 200 and 120, respectively. Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
01-25-2022, 03:07 AM
(This post was last modified: 01-25-2022 03:30 AM by robve.)
Post: #10
|
|||
|
|||
RE: Calculator graphics drawing benchmark
An additional result:
Ti-nspire cx II cas program: Ti Basic screen: 318x210 time: 2.65s performance: 25200 The program uses UseBuffer to increase performance: Code: Define LibPub hitomezashi(s)= - Rob "I count on old friends to remain rational" |
|||
01-25-2022, 05:03 PM
Post: #11
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-24-2022 02:29 AM)robve Wrote: I wonder what the HP Prime Python performance is for this benchmark? I don't have Python on my HP Prime, so hopefully someone comes up with a Python version to run the benchmark. As requested here is the Prime Python code Code: from hpprime import * The Prime comes with 2 modules that provide graphics. One is 'hpprime' and the other one is 'graphics'. Here I have used 'hpprime' because it also provides 'wait' and 'time' functions. The number of loops can be easily adjusted by assigning an other value to 'loop0', try for instance '100'. Higher values for the loops return better performance results because the initializing overhead is shared by the loops. Now here are some results Prime G1:
Prime G2:
The maximum I've seen during my experiments was about 6.2 millions This confirms what I've reported in other benchmark threads. the Python on the Prime outperforms every calculator so far, by quite a margin. If it only was more stable. Thank you for this gem. It was really fun to implement it on the Prime and to watch the nice graphics, I hadn't known before. It's a pity you haven't got Python on your Prime, so can't have a look at my 'wonderful, marvelous' Mandelbrot Explorer |
|||
01-25-2022, 06:51 PM
Post: #12
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-25-2022 05:03 PM)Guenter Schink Wrote: As requested here is the Prime Python code Great! I knew it was going to be fast, but this exceeds expectations. (01-25-2022 05:03 PM)Guenter Schink Wrote: This confirms what I've reported in other benchmark threads. the Python on the Prime outperforms every calculator so far, by quite a margin. If it only was more stable. It is interesting to watch the pattern emerge after the horizontal lines are drawn, the effect of the pattern "wave" (or "weave" perhaps) is kind of unexpected. This "wave effect" is visible only on a slow device, not the Prime! (01-25-2022 05:03 PM)Guenter Schink Wrote: It's a pity you haven't got Python on your Prime, so can't have a look at my 'wonderful, marvelous' Mandelbrot Explorer But then I no longer have an excuse to not write the Python code myself on the Prime - Rob "I count on old friends to remain rational" |
|||
01-25-2022, 08:34 PM
Post: #13
|
|||
|
|||
RE: Calculator graphics drawing benchmark
Quote:It is interesting to watch the pattern emerge after the horizontal lines are drawn, the effect of the pattern "wave" (or "weave" perhaps) is kind of unexpected. This "wave effect" is visible only on a slow device, not the Prime!It can be done on the Prime as well by simply inserting a WAIT command. Inserting eval("WAIT(0.05") after each vertical line statement lets you watch the pattern develop. Günter |
|||
01-28-2022, 02:24 PM
Post: #14
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-25-2022 05:03 PM)Guenter Schink Wrote: This confirms what I've reported in other benchmark threads. the Python on the Prime outperforms every calculator so far, by quite a margin. I've used the latest Ti's and Casios for some time and I've written many programs on these, but these cannot compare to the HP Prime G2, which has been my hands-down favorite. Perhaps this thread should be moved to the "HP Prime" forum to cheer it on - Rob "I count on old friends to remain rational" |
|||
01-28-2022, 07:15 PM
Post: #15
|
|||
|
|||
RE: Calculator graphics drawing benchmark
Just for fun, I punched this into the Wizard BASIC card using my just-received OZ-7600 and got about 2.5 seconds. Same performance when the card is running in an OZ-7200.
The program requires almost no change from the PC-E500 version, just an adjustment to the screen dimension constants on line 10 (96x64 pixels). Code: 10 CLS:WAIT 0:H=95,V=63,S=4,P=&F8F8 This card really shines with the hugely improved keyboard on the OZ-7600 models! (QWERTY layout, better feel and response, and no diving into a SYMBOL menu constantly.) |
|||
01-28-2022, 08:05 PM
Post: #16
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-28-2022 07:15 PM)Dave Britten Wrote: Just for fun, I punched this into the Wizard BASIC card using my just-received OZ-7600 and got about 2.5 seconds. Same performance when the card is running in an OZ-7200. Nice! Thank you for contributing. It is interesting that the OZ-7600 BASIC card runs slightly faster for this benchmark than the PC-E500. I saw that a similar IQ-7700 for example runs 32,768Hz when the E500 runs at 2.3MHz (effectively though CPU instruction cycles take 3 clock cycles). So what is going on? The BASIC card has a CPU? I wish I had the BASIC card. It seems unobtainable. I have a OZ-9500, which is nice, but can't do much with it. - Rob "I count on old friends to remain rational" |
|||
01-29-2022, 03:03 AM
Post: #17
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-28-2022 08:05 PM)robve Wrote:(01-28-2022 07:15 PM)Dave Britten Wrote: Just for fun, I punched this into the Wizard BASIC card using my just-received OZ-7600 and got about 2.5 seconds. Same performance when the card is running in an OZ-7200. I don't know the exact speed, but I'm assuming the Wizard's CPU runs a lot faster than 32 kHZ. That looks more like the speed of the crystal oscillator that controls the real-time clock, since it's an organizer and all. The card doesn't contain its own CPU (as far as I know), but it does contain its own battery-backed SRAM for storage, as Wizard cards generally do. The BASIC card isn't the easiest thing to find, but they do show up on ebay from time to time. I've bought a total of three of them myself over the years (two for my own use, and one as a gift), and I'm sure there were many more that passed by without me noticing. My advice is to just search for Sharp Wizard listings and start browsing, as they're sometimes bundled without mention in the listing title. I wish Sharp had made a similar BASIC environment for the OZ-9000 series, or the ZR-5000/3000 Zaurus models! On a side note, the spreadsheet card for the OZ-7000/8000 is surprisingly good, and also worth tracking down. |
|||
01-29-2022, 03:35 AM
Post: #18
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-29-2022 03:03 AM)Dave Britten Wrote: ...I wish Sharp had made a similar BASIC environment for the OZ-9000 series, or the ZR-5000/3000 Zaurus models! The 2 BASIC Cards for 7xxx and 8xxx machines (16- and 40-column respectively) actually do work correclty on the 9000 series Wizard models, but they only see/use the original display size, and are not full-screen, so their use is definitely limited, but still viable for some things. --Bob Prosperi |
|||
01-29-2022, 09:16 AM
(This post was last modified: 01-29-2022 10:38 AM by C.Ret.)
Post: #19
|
|||
|
|||
RE: Calculator graphics drawing benchmark HP-28S
Nice benchmark !
Here is a solution for the HP-28S Advanced Scientific (and Graphic) Calculator : Code: « { 31 241 } { 0 1 16 17 } Performance is 175.36 Time ~25" Screen 137x32 UPDATE: A few drawing time is spare with this code (same algorithm, better implementation into the HP-28S): Code:
Screen: 137x32 Time: ~14" Performance: 313.14 Here links to screen captures: HP-28S Hitomezashi screen capture 1 HP-28S Hitomezashi screen capture 2 HP-28S Hitomezashi screen capture 3 |
|||
01-29-2022, 01:03 PM
Post: #20
|
|||
|
|||
RE: Calculator graphics drawing benchmark
(01-29-2022 03:35 AM)rprosperi Wrote:(01-29-2022 03:03 AM)Dave Britten Wrote: ...I wish Sharp had made a similar BASIC environment for the OZ-9000 series, or the ZR-5000/3000 Zaurus models! Well shoot, guess I'd better go shopping for a 9000! How does it handle the touch keys? Is there just an unlabeled 4x4 button grid on the touch screen? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 13 Guest(s)