Post Reply 
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:

HP Prime Python (input S=4)
---------------------------
from hpprime import *
from urandom import *
 
def hitomezashi():
    color=255
    eval('PRINT')
    s=int(input("s = "));print(s)
    eTime=eval('time')
    loop0=100
    loop=loop0
    while loop >0:
      fillrect(0,0,0,320,240,0xffffff,0xffffff)

      dimgrob(1,320,1,0xffffff)            
      for x in range(0,320,2*s):
         line(1,x,0,x+s,0,color) 

      dimgrob(2,1,240,0xffffff)
      for y in range(0,240,2*s):
         line(2,0,y,0,y+s,color)
                   
      for y in range(0,240,s):
        i=s*randint(0,1)
        blit(0,i,y,1)      
      for x in range(0,320,s):
        i=s*randint(0,1)
        blit(0,x,i,2)
#        eval("Wait(.03)")
      loop=loop-1
      
    eTime=(eval('time')-eTime)/loop0      
    eval("WAIT")
    print("Loops  = ",loop0)
    print("Time per loop =\n {:,} sec".format(round(eTime,12)))
    performance=round(320*240/eTime)
    print("Performance =\n {:,d} ".format(performance))   
 
hitomezashi()

HP Prime Python (input S=4) old version without GROBs
-----------------------------------------------------
from hpprime import *
from urandom import *
 
def hitomezashi():
    color=255
    s=int(input("s= "));print(s)   
    eTime=eval('time')
    loop0=1
    loop=loop0
    while loop >0:
      fillrect(0,0,0,320,240,0xffffff,0xffffff)
      for y in range(0,240,s):
        i=s*randint(0,1)
        for x in range(i,320,2*s):
          line(0,x,y,x+s,y,color)
      for x in range(0,320,s):
        i=s*randint(0,1)
        for y in range(i,240,2*s):
          line(0,x,y,x,y+s,color)
      loop=loop-1
    eTime=(eval('time')-eTime)/loop0      
    eval("WAIT")
    print("Loops= ",loop0)
    print("Time per loop= {:,}".format(round(eTime,12)))
    performance=round(320*240/eTime)
    print("Performance= {:,d}".format(performance))   
 
hitomezashi()

HP Prime HPPL (input S=4)
-------------------------
EXPORT Hitomezashi(S)
BEGIN
LOCAL X,Y,I,C;
C:=RGB(0,0,255);
RECT_P():
FOR Y FROM 0 TO 239 STEP S DO
 X:=S*RANDINT();
 FOR I FROM X TO 319 STEP 2*S DO
  LINE_P(I,Y,I+S,Y,C)
 END;
END;
FOR X FROM 0 TO 319 STEP S DO
 Y:=S*RANDINT();
 FOR I FROM Y TO 239 STEP 2*S DO
  LINE_P(X,I,X,I+S,C)
 END;
END;
WAIT();
END;

DM42 RPN (input S=4)
--------------------
00 { 230-Byte Prgm }
01▸LBL "HT"
02 "GrMod"
03 ASTO 03
04 3
05 STO IND 03
06 RCL "S"
07 1ᴇ3
08 ÷
09 STO "S1"
10 CLA
11▸LBL 01
12 1
13 XTOA
14 ISG "S1"
15 GTO 01
16 RCL "ResX"
17 1ᴇ3
18 ÷
19 RCL "S"
20 2
21 ×
22 1ᴇ5
23 ÷
24 +
25 STO "X1"
26 RCL "ResY"
27 1ᴇ3
28 ÷
29 RCL "S"
30 1ᴇ5
31 ÷
32 +
33 STO "A"
34▸LBL 02
35 RAN
36 2
37 ×
38 IP
39 RCL "S"
40 ×
41 RCL "X1"
42 +
43 STO "B"
44▸LBL 04
45 RCL "A"
46 RCL "B"
47 AGRAPH
48 ISG "B"
49 GTO 04
50 ISG "A"
51 GTO 02
52 CLA
53 2
54 RCL "S"
55 Y^X
56 1
57 -
58 XTOA
59 RCL "ResY"
60 1ᴇ3
61 ÷
62 RCL "S"
63 2
64 ×
65 1ᴇ5
66 ÷
67 +
68 STO "Y1"
69 RCL "ResX"
70 1ᴇ3
71 ÷
72 RCL "S"
73 1ᴇ5
74 ÷
75 +
76 STO "B"
77▸LBL 08
78 RAN
79 2
80 ×
81 IP
82 RCL "S"
83 ×
84 RCL "Y1"
85 +
86 STO "A"
87▸LBL 10
88 RCL "A"
89 RCL "B"
90 AGRAPH
91 ISG "A"
92 GTO 10
93 ISG "B"
94 GTO 08
95 END

Casio fx-CG50 Python (input s=4)
--------------------------------
# Hitomezashi patterns
from casioplot import *
from random import randint

def wait():
  try:
    while 1:
      pass
  except KeyboardInterrupt:
    pass

def line(x1,x2,y1,y2,color):
  x1=int(x1)
  x2=int(x2)
  y1=int(y1)
  y2=int(y2)
  dx=x2-x1
  dy=y2-y1
  if abs(dx)>=abs(dy):
    s=1 if x2>x2 else -1
    d=s*dy/dx
    for x in range(x1,x2+s,s)
      set_pixel(x,y1,color)
      y1+=d
  else:
    s=1 if y2>y2 else -1
    d=s*dx/dy
    for y in range(y1,y2+s,s)
      set_pixel(x1,y,color)
      x1+=d

def hitomezashi():
  color=(0,0,255)
  while 1:
    s=int(input("s="))
    clear_screen()
    for y in range(0,188,s):
      i=s*randint(0,1)
      for x in range(i,380,2*s):
        line(x,y,x+s,y,color)
    for x in range(0,380,s):
      i=s*randint(0,1)
      for y in range(i,188,2*s):
        line(x,y,x,y+s,color)
    show_screen()
    wait()

hitomezashi()

Casio fx-CG50 Casio Basic
-------------------------
' Hitomezashi patterns
384-4→H↵
216-28→V↵
ViewWindow 1,H-1,H,1,V,V-1↵
4→S↵
For 1→Y To V-1 Step S↵
SInt 2Rnd# →I↵
For I+1→X To H-1 Step S↵
Blue Plot X,Y↵
Blue Plot X+S,Y↵
Blue Line↵
Next↵
Next↵
For 1→X To H-1 Step S↵
SInt 2Rnd# →I↵
For I+1→Y To V-1 Step S↵
Blue Plot X,Y↵
Blue Plot X,Y+S↵
Blue Line↵
Next↵
Next↵

Casio fx-9860G Slim Casio Basic
-------------------------------
' Hitomezashi patterns
128→H↵
64→V↵
ViewWindow 1,H-1,H,1,V,V-1↵
4→S↵
For 1→Y To V-1 Step S↵
SInt 2Rnd# →I↵
For I+1→X To H-1 Step S↵
Plot X,Y↵
Plot X+S,Y↵
Line↵
Next↵
Next↵
For 1→X To H-1 Step S↵
SInt 2Rnd# →I↵
For I+1→Y To V-1 Step S↵
Plot X,Y↵
Plot X,Y+S↵
Line↵
Next↵
Next↵

Casio fx-7000G and fx-7500G Casio Basic
---------------------------------------
4→S
Cls
Range 1,95,96,1,63,64
1→Y
Lbl 0:1→X:Ran#<.5⇒S+1→X
Lbl 1:Plot X,Y:Plot X+S,Y:Line
X+S→X
X+S<96⇒Goto 1
Y+S→Y
Y<64⇒Goto 0
1→X
Lbl 2:1→Y:Ran#<.5⇒S+1→Y
Lbl 3:Plot X,Y:Plot X,Y+S:Line
Y+S→Y
Y+X<64⇒Goto 3
X+S→X
X<96⇒Goto 2

Sharp PC-G850VS C
-----------------
' Hitomezashi patterns (with an "Easter egg")
10 int rnd(int n) {
11  static unsigned long s=5323;
12  s=8253729*s+2396403;
13  return (s%32767*n)/32767+1;
14 }
15 main() {
16  int x,y,c;
17  while (1) {
18   clrscr();
19   for(y=0;y<48;y+=4) {
20    x=(rnd(2)-1)<<2;
21    line(x,y,143,y,0,0xf8f8,0);
22   }
23   for(x=0;x<144;x+=4) {
24    y=(rnd(2)-1)<<2;
25    line(x,y,x,47,0,0xf8f8,0);
26   }
27   for(c=1;c<7;++c) {
28    getch();
29    do {
30     x=rnd(144)-1;
31     y=rnd(48)-1;
32    } while(point(x,y));
33    paint(x,y,c);
34   }
35   getch();
36  }
37 }

Sharp PC-G850VS BASIC
---------------------
' Hitomezashi patterns
10 CLS:WAIT 0:H=143,V=47,S=4,P=&F8F8
20 FOR  Y=0 TO V STEP S
30 LINE (S*(RND 2-1),Y)-(H,Y),P
40 NEXT Y
50 FOR  X=0 TO H STEP S
60 LINE (X,S*(RND 2-1))-(X,V),P
70 NEXT X
80 WAIT:GPRINT:GOTO 10

Sharp PC-E500S Forth500
-----------------------
\ HITOMEZA.FTH
.( Hitomezashi patterns)
\ simple libc srand PRNG - see Forth500 manual
2VARIABLE seed
: rand seed 2@ 1103515245. D* 12345. D+ TUCK seed 2! 32767 AND ;
4     CONSTANT s
239   CONSTANT h
31    CONSTANT v
$f8f8 CONSTANT p
: hitomezashi
  PAGE
  v 1+ 0 DO
    rand 1 AND s * i h i p GLINE
  s +LOOP
  h 1+ 0 DO
    i rand 1 AND s * i v p GLINE
  s +LOOP
  KEY DROP
;

Sharp PC-E500S BASIC
--------------------
' Hitomezashi patterns
10 CLS:WAIT 0:H=239,V=31,S=4,P=&F8F8
20 FOR  Y=0 TO V STEP S
30 LINE (S*(RND 2-1),Y)-(H,Y),P
40 NEXT Y
50 FOR  X=0 TO H STEP S
60 LINE (X,S*(RND 2-1))-(X,V),P
70 NEXT X
80 WAIT:GPRINT:GOTO 10

Sharp OZ-9500 with OZ-8B03 BASIC card
-------------------------------------
10 CLS:WAIT 0:H=239,V=63,S=4,P=&F8F8
20 FOR  Y=0 TO V STEP S
30 LINE (S*(RND 2-1),Y)-(H,Y),P
40 NEXT Y
50 FOR  X=0 TO H STEP S
60 LINE (X,S*(RND 2-1))-(X,V),P
70 NEXT X
80 WAIT:GPRINT:GOTO 10

Sharp OZ-7600 with BASIC card
-----------------------------
10 CLS:WAIT 0:H=95,V=63,S=4,P=&F8F8
20 FOR  Y=0 TO V STEP S
30 LINE (S*(RND 2-1),Y)-(H,Y),P
40 NEXT Y
50 FOR  X=0 TO H STEP S
60 LINE (X,S*(RND 2-1))-(X,V),P
70 NEXT X
80 WAIT:GPRINT:GOTO 10

Sharp PC-1350/60 and PC-2500 BASIC
----------------------------------
' Hitomezashi patterns
10 "H" CLS:WAIT 0:H=149,V=31,S=4,P=&F8F8
20 FOR  Y=0 TO V STEP S
30 LINE (S*(RND 2-1),Y)-(H,Y),P
40 NEXT Y
50 FOR  X=0 TO H STEP S
60 LINE (X,S*(RND 2-1))-(X,V),P
70 NEXT X
80 WAIT:GPRINT:GOTO 10

Ti Voyage 200 Ti Basic (input size=4)
-------------------------------------
hitomeza()
Prgm
 Local x,y,i,s
 Loop
  Request "size",s
  expr(s)→s
  If s>1 Then
   Exit
  EndIf
 EndLoop
 ClrDraw
 For y,0,102-s,s
  s*(rand(2)-1)→i
  For x,i,239-s,2*s
   PxlLine y,x,y,x+s
  EndFor
 EndFor
 For x,0,239-s,s
  s*(rand(2)-1)→i
  For y,i,102-s,2*s
   PxlLine y,x,y+s,x
  EndFor
 EndFor
EndPrgm

Amstrad NC100 (s=4)
-------------------
 10 CLS:S%=4:TIME=0
 20 FOR Y%=0 TO 63 STEP S%
 30   I%=S%*(RND(2)-1)
 40   FOR X%=I% TO 479-S% STEP 2*S%
 50     MOVE X%,Y%:DRAW X%+S%,Y%
 60   NEXT
 70 NEXT
 80 FOR X%=0 TO 479 STEP S%
 90   I%=S%*(RND(2)-1)
100   FOR Y%=I% TO 63-S% STEP 2*S%
110     MOVE X%,Y%:DRAW X%,Y%+S%
120   NEXT
130 NEXT
140 PRINT TIME

TRS-80 Model 100 (input s=4)
----------------------------
' Hitomezashi patterns
10 DEFINT A-Z:CLS:INPUT "s=";S:CLS
20 FOR Y=0 TO 63 STEP S
30 I=-S*(RND(1)<.5)
40 FOR X=I TO 239-S STEP 2*S
50 LINE (X,Y)-(X+S,Y)
60 NEXT
70 NEXT
80 FOR X=0 TO 239 STEP S
90 I=-S*(RND(1)<.5)
100 FOR Y=I TO 63-S STEP 2*S
110 LINE (X,Y)-(X,Y+S)
120 NEXT
130 NEXT
140 IF INKEY$="" THEN 140
150 GOTO 10

SwissMicros DM42
----------------
00 { 161-Byte Prgm }
01▸LBL "HIT"
02 LSTO "S"
03 CLLCD
04 RCL "ResY"
05 1
06 XEQ 14
07 LSTO "Y"
08▸LBL 02
09 RCL "ResX"
10 2
11 XEQ 14
12 LSTO "X"
13▸LBL 03
14 RCL "Y"
15 RCL "X"
16 RCL ST Y
17 RCL ST Y
18 RCL+ "S"
19 XEQ "LINE"
20 ISG "X"
21 GTO 03
22 ISG "Y"
23 GTO 02
24 RCL "ResX"
25 1
26 XEQ 14
27 STO "X"
28▸LBL 12
29 RCL "ResY"
30 2
31 XEQ 14
32 STO "Y"
33▸LBL 13
34 RCL "Y"
35 RCL "X"
36 RCL ST Y
37 RCL+ "S"
38 RCL ST Y
39 XEQ "LINE"
40 ISG "Y"
41 GTO 13
42 ISG "X"
43 GTO 12
44 RTN
45▸LBL 14
46 RCL "S"
47 %
48 RCL+ ST Z
49 1ᴇ3
50 ÷
51 X<>Y
52 DSE ST X
53 GTO 00
54 SIGN
55 +
56 RTN
57▸LBL 00
58 +
59 RAN
60 RCL× "S"
61 IP
62 +
63 END

00 { 76-Byte Prgm }
01▸LBL "LINE"
02 X<>Y
03 FC? 73
04 GTO 00
05 RECT
06 XEQ 00
07 POLAR
08 RTN
09▸LBL 00
10 CPX?
11 GTO 00
12 COMPLEX
13 X<> ST Z
14 COMPLEX
15 XEQ 00
16 COMPLEX
17 RTN
18▸LBL 00 @        (x0,y0) (x1,y1)
19 X<>Y
20 ENTER
21 RCL- ST Z @        (dx,dy)    (x1,y1)    (x0,y0)
22 COMPLEX @    (dx,dy)    dy    dx    (x1,y1)    (x0,y0)
23 X<0?
24 +/-
25 X<>Y
26 X<0?
27 +/- @        (dx,dy)    adx    ady
28 X>Y?
29 X<>Y
30 R↓ @            |max|    (x1,y1)    (x0,y0)
31 X>0?
32 STO÷ ST L @    delta    n    (x1,y1)    (x0,y0)
33 LASTX
34 R↓
35 IP
36 +/-
37 X<> ST Z
38▸LBL 05 @        (x0,y0)    (x1,y1)    -n    delta
39 PIXEL
40 RCL+ ST T
41 ISG ST Z
42 GTO 05
43 R↓
44 PIXEL
45 END

Ti-nspire cx II cas (input s=4)
-------------------------------
Define LibPub hitomezashi(s)=
Prgm
Local x,y,h,v
UseBuffer
Clear
SetColor 0,0,255
SetPen 1,1
h:=317
v:=209
For y,0,v,s
  For x,s*randInt(0,1),h,2*s
    DrawLine x,y,x+s,y
  EndFor
EndFor
For x,0,h,s
  For y,s*randInt(0,1),v,2*s
    DrawLine x,y,x,y+s
  EndFor
EndFor
PaintBuffer
EndPrgm

Sharp EL-9300C
--------------
s=4
ClrG
Range 1,95,96,1,63,64
y=1
Label 0
u=1
If random<0.5 Goto 1
u=s+1
Label 1
Line u,y,u+s,y
u=u+s+s
If u<95 Goto 1
y=y+s
If y<63 Goto 0
x=1
Label 2
v=1
If random<0.5 Goto 3
v=s+1
Label 3
Line x,v,x,v+s
v=v+s+s
If v<63 Goto 3
x=x+s
If x<95 Goto 2
End

Sharp EL-9900
-------------
4⇒S
Rect
AxisOFF
GridOFF
ExprOFF
1⇒Xmin
127⇒Xmax
128⇒Xscl
1⇒Ymin
63⇒Ymax
64⇒Yscl
ClrG
For Y,1,62,S
int(2random)×S+1⇒U
For U,U,126,2S
Line(U,Y,U+S,Y)
Next
Next
For X,1,126,S
int(2random)×S+1⇒V
For V,V,62,2S
Line(X,V,X,V+S)
Next
Next
End

HP 28S RPN
----------
« 31 CHR 241 CHR 2 →LIST            
  0 CHR 1 CHR 16 CHR 17 CHR 4 →LIST
  17 CHR 16 CHR 1 CHR 0 CHR 4 →LIST                → LC LR LI
  « "" 1 34 START
               LC RAND 2 * CEIL GET +
            NEXT
    "" "" 1 4 START
               RAND 4 * CEIL ROT LI 3 PICK GET +
               ROT LR 4 ROLL GET +
          NEXT                                     → CC CR CI
    « "" 1 4 FOR r 
              1 34 FOR c
                    CC c DUP SUB +
                    IF 1 FS?C THEN CI ELSE CR 1 SF END 
                    r DUP SUB DUP DUP + + +
             NEXT 241 CHR +
         NEXT →LCD » » »

HP 50g System RPL
-----------------
::
   ( 1 arg expected )
   CK1NoBlame

   CK&DISPATCH1
   real ::
      ( setup/clear display )
      ClrDA1IsStat
      RECLAIMDISP
      TURNMENUOFF

      ( convert arg to BINT )
      COERCE {{ s }}

      ( draw horizontal lines )
      EIGHTY ZERO_DO (DO)
         %RAN % .5 %< ITE ONE ZERO s #*
         131 SWAP DO
            INDEX@ JINDEX@
            OVER s #+ JINDEX@
            LINEON
         s #2* +LOOP
      s +LOOP

      ( draw vertical lines )
      131 ZERO_DO (DO)
         %RAN % .5 %< ITE ONE ZERO s #*
         80 SWAP DO
            JINDEX@ INDEX@
            OVER INDEX@ s #+
            LINEON
         s #2* +LOOP
      s +LOOP

      ( abandon LAM )
      ABND

      ( freeze the display )
      SetDAsTemp
   ;
;

HP 50g User RPL
---------------
\<<
   R\->B
   \-> s
   \<<
      @ clear/view PICT
      ERASE { #0 #0 } PVIEW

      @ draw horizontal lines
      #0 #79d FOR y
         RAND .5 < s *
         #130d FOR x
            x y
            2. \->LIST
            x s + y
            2. \->LIST
            LINE
         s 2. * STEP
      s STEP

      @ draw vertical lines
      #0 #130d FOR x
         RAND .5 < s *
         #79d FOR y
            x y
            2. \->LIST
            x y s +
            2. \->LIST
            LINE
         s 2. * STEP
      s STEP

      @ leave image on display
      7. FREEZE
   \>>
\>>

HP 41C with HP82240A printer connected via HP82242A IR module
-------------------------------------------------------------
01 ►LBL"HITO"
02 · ADV · CF 21 · FIX 0 · XEQ 12
06 ►LBL 01
07 · VIEW 01 · 209 · XEQ 10 · 31 · + · STO IND 01 · ISG 01 · GTO 01
15 ►LBL 02
16 · VIEW 02 · 1 · XEQ 10 · 16 · XEQ 10 · + · STO IND 02 · ISG 02 · GTO 02
25 ►LBL 05
26 · SF 21 · XEQ 12
28 ․ LBL 03
29 · 0 · ACCOL
31 ►LBL 04
32 · RCL IND 01 · ACCOL · RCL IND 02 · FC?C 00 · XEQ 07 · ACCOL · ACCOL · ACCOL · ISG 01 · GTO 04
42 · PRBUF · XEQ 11 · ISG 02 · GTO 03
46 · ADV · TONE 5 · RTN

49 ►LBL 07
50 · 17 · X<>Y · - · SF 00 · RTN

55 ►LBL 10
56 · PI · LN · RCL 00 · + · 5 · Y^X · FRC · STO 00 · RND · * · RTN

67 ►LBL 12
68 · 44.063 · STO 02 
70 ►LBL 11
71 · 3.043 · STO 01 · SF 00 · END

Sharp EL-5200/EL-9000 AER-II (input S=4)
----------------------------------------
(spaces and newlines are not part of the program)
:Hitomezashi
M:➊
  J=1␣
  ↳ I=S INT (RND +.5)+1␣
  ↳ LINE I,J,I+S,J DRAW␣
  I=I+2S␣
  H>=I→Y→[↰]
  J=J+S␣
  32>=J→Y→[↰]
  I=1␣
  ↳ J=S INT (RND +.5)+1␣
  ↳ LINE I,J,I,J+S DRAW␣
  J=J+2S␣
  V>=J→Y→[↰]
  I=I+S␣
  96>=I→Y→[↰]
➊:S=?␣
  RANGE 1,96,97,1,32,33␣
  H=96-S␣
  V=32-S

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
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" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
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):
      i=s*randint(0,1)
      for x in range(i,188,2*s):
        line(x,y,x,y+s,color)

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 }
01▸LBL "HIT"
02 LSTO "S"
03 CLLCD
04 RCL "ResY"
05 1
06 XEQ 14
07 LSTO "Y"
08▸LBL 02
09 RCL "ResX"
10 2
11 XEQ 14
12 LSTO "X"
13▸LBL 03
14 RCL "Y"
15 RCL "X"
16 RCL ST Y
17 RCL ST Y
18 RCL+ "S"
19 XEQ "LINE"
20 ISG "X"
21 GTO 03
22 ISG "Y"
23 GTO 02
24 RCL "ResX"
25 1
26 XEQ 14
27 STO "X"
28▸LBL 12
29 RCL "ResY"
30 2
31 XEQ 14
32 STO "Y"
33▸LBL 13
34 RCL "Y"
35 RCL "X"
36 RCL ST Y
37 RCL+ "S"
38 RCL ST Y
39 XEQ "LINE"
40 ISG "Y"
41 GTO 13
42 ISG "X"
43 GTO 12
44 RTN
45▸LBL 14
46 RCL "S"
47 %
48 RCL+ ST Z
49 1ᴇ3
50 ÷
51 X<>Y
52 DSE ST X
53 GTO 00
54 SIGN
55 +
56 RTN
57▸LBL 00
58 +
59 RAN
60 RCL× "S"
61 IP
62 +
63 END

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 }
01▸LBL "LINE"
02 X<>Y
03 FC? 73
04 GTO 00
05 RECT
06 XEQ 00
07 POLAR
08 RTN
09▸LBL 00
10 CPX?
11 GTO 00
12 COMPLEX
13 X<> ST Z
14 COMPLEX
15 XEQ 00
16 COMPLEX
17 RTN
18▸LBL 00 @        (x0,y0) (x1,y1)
19 X<>Y
20 ENTER
21 RCL- ST Z @        (dx,dy)    (x1,y1)    (x0,y0)
22 COMPLEX @    (dx,dy)    dy    dx    (x1,y1)    (x0,y0)
23 X<0?
24 +/-
25 X<>Y
26 X<0?
27 +/- @        (dx,dy)    adx    ady
28 X>Y?
29 X<>Y
30 R↓ @            |max|    (x1,y1)    (x0,y0)
31 X>0?
32 STO÷ ST L @    delta    n    (x1,y1)    (x0,y0)
33 LASTX
34 R↓
35 IP
36 +/-
37 X<> ST Z
38▸LBL 05 @        (x0,y0)    (x1,y1)    -n    delta
39 PIXEL
40 RCL+ ST T
41 ISG ST Z
42 GTO 05
43 R↓
44 PIXEL
45 END

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
Find all posts by this user
Quote this message in a reply
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:
Code:
    for x in range(0,380,s):
      i=s*randint(0,1)
      for x in range(i,188,2*s):
        line(x,y,x,y+s,color)

the inner loop should be 'for y in'.

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?
[...]
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

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" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
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
Find all posts by this user
Quote this message in a reply
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 thought S=8 was also ok as eg the Casio fx-CG50 Casio Basic code has it hardcoded.
Werner

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" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
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" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
01-24-2022, 04:37 PM
Post: #9
RE: Calculator graphics drawing benchmark
(01-24-2022 03:28 PM)robve Wrote:  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.

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
Find all posts by this user
Quote this message in a reply
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)=
Prgm
Local x,y,h,v
UseBuffer
Clear
SetColor 0,0,255
SetPen 1,1
h:=317
v:=209
For y,0,v,s
  For x,s*randInt(0,1),h,2*s
    DrawLine x,y,x+s,y
  EndFor
EndFor
For x,0,h,s
  For y,s*randInt(0,1),v,2*s
    DrawLine x,y,x,y+s
  EndFor
EndFor
PaintBuffer
EndPrgm

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
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.

- Rob

As requested Smile here is the Prime Python code
Code:
from hpprime import *
from urandom import *
 
def hitomezashi():
    color=255
    s=int(input("s= "));print(s)   
    eTime=eval('time')
    loop0=1
    loop=loop0
    while loop >0:
      fillrect(0,0,0,320,240,0xffffff,0xffffff)
      for y in range(0,240,s):
        i=s*randint(0,1)
        for x in range(i,320,2*s):
          line(0,x,y,x+s,y,color)
      for x in range(0,320,s):
        i=s*randint(0,1)
        for y in range(i,240,2*s):
          line(0,x,y,x,y+s,color)
      loop=loop-1
    eTime=(eval('time')-eTime)/loop0      
    eval("WAIT")
    print("Loops= ",loop0)
    print("Time per loop= {:,}".format(round(eTime,12)))
    performance=round(320*240/eTime)
    print("Performance= {:,d}".format(performance))   
 
hitomezashi()

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:
  • 1 loop 0.044 sec/loop Performance:1,745,455
  • 100 loops 0.0353 sec/loop Performance:2,177,488
  • 1000 loops 0.03496 sec/loop Performance:2,196,796

Prime G2:
  • 1 loop 0.014 sec/loop Performance:5,485,714
  • 100 loops 0.01326 sec/loop Performance:5,791,855
  • 1000 loops 0.013258 sec/loop Performance:5,792,729
So there isn't much difference between 100 or 1000 loops. Using 'draw_line' from module graphics gives a performance boost of about 1.4%

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 Smile
Find all posts by this user
Quote this message in a reply
01-25-2022, 06:51 PM
Post: #12
RE: Calculator graphics drawing benchmark
(01-25-2022 05:03 PM)Guenter Schink Wrote:  As requested Smile here is the Prime Python code
[...]
Prime G2:
  • 1 loop 0.014 sec/loop Performance:5,485,714
  • 100 loops 0.01326 sec/loop Performance:5,791,855
  • 1000 loops 0.013258 sec/loop Performance:5,792,729

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.

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 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 Smile

But then I no longer have an excuse to not write the Python code myself on the Prime Wink

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
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
Find all posts by this user
Quote this message in a reply
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 Wink

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
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
20 FOR  Y=0 TO V STEP S
30 LINE (S*(RND 2-1),Y)-(H,Y),P
40 NEXT Y
50 FOR  X=0 TO H STEP S
60 LINE (X,S*(RND 2-1))-(X,V),P
70 NEXT X
80 WAIT:GPRINT:GOTO 10

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.)
Visit this user's website Find all posts by this user
Quote this message in a reply
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" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
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.

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 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.
Visit this user's website Find all posts by this user
Quote this message in a reply
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!

On a side note, the spreadsheet card for the OZ-7000/8000 is surprisingly good, and also worth tracking down.

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
Find all posts by this user
Quote this message in a reply
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 }
  1 34 START RAND * 2 CEIL NEXT 34 →LIST
  1  4 START RAND * 4 CEIL NEXT  4 →LIST  → CC CR C R
  « ""
    1 4 FOR r
       1 34 FOR c
         CC C C GET GET CHR + 
         CR R r GET IF 1 FS?C THEN 5 - NEG ELSE 1 SF END GET CHR DUP DUP + + + 
       NEXT 241 CHR +
    NEXT →LCD » »

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:

« 31 CHR 241 CHR 2 →LIST            
  0 CHR 1 CHR 16 CHR 17 CHR 4 →LIST
  17 CHR 16 CHR 1 CHR 0 CHR 4 →LIST                → LC LR LI
  « "" 1 34 START
               LC RAND 2 * CEIL GET +
            NEXT
    "" "" 1 4 START
               RAND 4 * CEIL ROT LI 3 PICK GET +
               ROT LR 4 ROLL GET +
          NEXT                                     → CC CR CI
    « "" 1 4 FOR r 
              1 34 FOR c
                    CC c DUP SUB +
                    IF 1 FS?C THEN CI ELSE CR 1 SF END 
                    r DUP SUB DUP DUP + + +
             NEXT 241 CHR +
         NEXT →LCD » » »

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
Find all posts by this user
Quote this message in a reply
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!

On a side note, the spreadsheet card for the OZ-7000/8000 is surprisingly good, and also worth tracking down.

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.

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?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)