Emulator vs simulator performance
|
06-10-2020, 07:57 AM
Post: #11
|
|||
|
|||
RE: Emulator vs simulator performance
(06-05-2020 04:56 PM)Werner Wrote:(06-05-2020 03:45 PM)J-F Garnier Wrote: Yes, the 42S is internally using RPL. But Free42 is written in C, not assembly language, so the comparison is fair... but Free42 is compiled, and the 42 SysRPL is interpreted. SysRPL is not exactly interpreted. An interpreter such as HP Basic uses tokens and relies on tables to get the execution address (on HP Basic, it's quite complex and relatively slow with all the possible LEXs to scan). In SysRPL, the "tokens" are the execution addresses themselves. The right term is probably "threaded code" as for the Forth language. But I'm not a RPL expert :-) (06-09-2020 08:49 PM)Jonathan Busby Wrote:Quote:Also, it's my understanding that the 42s is implemented in SysRPL. That adds another layer of complication and slowdown compared to assembly language.Indeed RPL on Saturn CPU's involves at least *three* levels of indirection a lot of the time What is the penalty of SysRPL compared to assembly language? I tried to answer by porting Valentin's program to the HP-32SII, emulated in Christoph's Emu42. So the comparison is done at constant CPU speed. Here is the result, for 10,000 points as above test: HP42S emulated on Emu42 1.24 : 5min08s (as above) HP32SII emulated on Emu42 1.24 : 2min01s ! So despite the 32SII RPN language is not as powerful for complex numbers than the 42S, the 32SII is 2.5x more efficient than the HP42S. I didn't expect so much difference, it's a surprise for me. The difference is not as large on the real machines, since the CPU speed is probably reduced on the 32S. The 42S is supposed to run at 1MHz, does somebody know the speed of the 32SII CPU? For the curious, here is the HP-32S program: Code: ; Mandelbrot area, for the HP-32S/SII J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)