Post Reply 
Emulator vs simulator performance
06-18-2020, 06:25 PM (This post was last modified: 06-18-2020 06:28 PM by J-F Garnier.)
Post: #20
RE: Emulator vs simulator performance
So I run the Valentin's problem on Emu71 too since the initial question was to compare a HP-71B emulator and Free42.
Here are the results, still with 10,000 points and other defauts parameters:
Emu71/Win 1.11 : 1min55s
Emu71/DOS 2.45 run in VirtualBox : 1min58s (not too bad for an old 16-bit DOS program :-)
(for reference, Free42 Decimal : 6.3s )

My first attempt was to adapt the 42S program with the same GOTOs, and so I identified the abnormal slow-down in Emu71/Win with GOTOs that Christoph reported above.
Then I replaced the GOTOs with FOR..NEXT loops and other constructions (anyway using GOTOs is considered as a bad programming style) and the Emu71/Win performance was then similar to Emu42 emulating a HP-32SII.


Here is my HP-71B program (without GOTOs):
Code:
10 ! ------
20 ! Mandelbrot set area
30 ! from Valentin Albillo "AM" program
40 ! 
50 COMPLEX Z,C,A
60 F=.25
70 INPUT "Points?";N
80 T=TIME
90 RANDOMIZE 1
100 K=256
110 M=0
120 ! 
130 FOR I=1 TO N
140 B=0
150 C=(RND*2.5-2,RND*1.2)
160 A=SGN(C) @ IF ABS((A-2)*A)*F>ABS(C) THEN B=1
170 IF ABS(C+1)<F THEN B=1
180 IF B THEN J=K+1 ELSE J=1 @ Z=C
190 B=1
200 FOR J=J TO K
210 Z=Z*Z+C @ IF ABS(Z)>=2 THEN J=K @ B=0
220 NEXT J
230 IF B THEN M=M+1
240 NEXT I
250 DISP M;TIME-T

The abnormal slowdown in Emu71/Win up to 1.11 occurs with GOTO/GOSUB and of course with statements directly or indirectly related to the annunciators:
SFLAG/CFLAG/RADIANS/DEGREES/USER

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Emulator vs simulator performance - J-F Garnier - 06-18-2020 06:25 PM



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