Post Reply 
Saturn family calculator performance
06-15-2018, 12:56 PM (This post was last modified: 06-15-2018 12:57 PM by sasa.)
Post: #1
Saturn family calculator performance
It would be interesting if someone can point if available list of performance for each scientific function (trigonometric, hyperbolic or similar available in specific model), used in some Saturn based calculator, preferable with exact example.

I'm aware of existence of some online (allegedly) emulators, unfortunately there is no debug mode in order to show elapsed time for calculating each function. If someone is aware of emulator with debug feature for any Saturn based calculator it would also be helpful info.

Thanks in advance for any point.
Find all posts by this user
Quote this message in a reply
06-15-2018, 06:44 PM
Post: #2
RE: Saturn family calculator performance
(06-15-2018 12:56 PM)sasa Wrote:  I'm aware of existence of some online (allegedly) emulators, unfortunately there is no debug mode in order to show elapsed time for calculating each function. If someone is aware of emulator with debug feature for any Saturn based calculator it would also be helpful info.
Emu48, and some of the relatives.
Emu71, V41, to name a few. Links can be found in the links section of this site.

The above emus may or may not have UI accessible timing info for single functions, but you can create suitable test scenarios with start-stop timers.

-- Ray
Find all posts by this user
Quote this message in a reply
06-18-2018, 04:57 AM
Post: #3
RE: Saturn family calculator performance
Hello,

The Saturn "base" chip was developped for the 71B.
The math code (+,-,/,*,trig, log...) was developped at the same time.
Looking at the source code, there is little to no differences between the implementation on various calculators (small bug fixes and the like)...
As a result, the performance will be prety much exactly the same in term of CPU cycles.
Various versions of the CPU did run at different speeds, and this will make a differences, but this can be infered without having to time it on the real HW.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
06-20-2018, 05:32 AM (This post was last modified: 06-20-2018 06:16 AM by sasa.)
Post: #4
RE: Saturn family calculator performance
Thank you both,

The Emu series of emulators for Saturn based calculators require entry point address list for each model in order to avoid expression parser overheat before actual calculation begins... The list may or may not be publicly available.

It would be very interesting if performance for specific samples in terms of instruction cycles per math function is available in HP archives and can be publicly posted.

Thank you.
Find all posts by this user
Quote this message in a reply
06-20-2018, 07:02 AM
Post: #5
RE: Saturn family calculator performance
(06-20-2018 05:32 AM)sasa Wrote:  It would be very interesting if performance for specific samples in terms of instruction cycles per math function is available in HP archives and can be publicly posted.

The number of clock cycles per Saturn instruction can be found in the HP-71 IDS. Is that what you mean?

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
06-20-2018, 07:50 AM (This post was last modified: 06-20-2018 08:07 AM by sasa.)
Post: #6
RE: Saturn family calculator performance
(06-20-2018 07:02 AM)Joe Horn Wrote:  The number of clock cycles per Saturn instruction can be found in the HP-71 IDS. Is that what you mean?

I meant performance in CPU cycles per math function. As Cyrille noted it is practically equal for all Saturn based models. For instance:

log(x) -> ? cycles
exp(x) -> ? cycles
tan(x) -> ? cycles
etc...

Of course, performance may depend of specific argument x for each function...

The official old HP-35 specification consisted as well "speed of operation" list for each group of math functions in ms, as shown here:
http://hpmemoryproject.org/wb_pages/wall_b_page_11b.htm

I'm not aware similar performance list exists for any Saturn based calculator.
Find all posts by this user
Quote this message in a reply
06-20-2018, 11:35 AM
Post: #7
RE: Saturn family calculator performance
a bit OT:

I remember the times HP71B was about to come around, expectations were great, after HP41 great success.

In my view this didn't happen. HP48 stole the show a few years on after even more successful (than 71b) hp42 and hp28.

hp42 looked somewhat "quicker" than hp48s and even hp48g
so it's not the chip only
Find all posts by this user
Quote this message in a reply
06-20-2018, 10:44 PM
Post: #8
RE: Saturn family calculator performance
(06-20-2018 11:35 AM)RMollov Wrote:  hp42 looked somewhat "quicker" than hp48s and even hp48g
so it's not the chip only
The "OS" of the 42S is a stripped-down RPL kernel. Stripped-down in that it supports a limited number of object types, and does not support bank-switching.
The stack and status registers are on "fixed" addresses within SYSRAM, as opposed to the unlimited stack on the 48 series, which is a list of pointers, referred to by a pointer.
Nonetheless the 42S features internal user stack access functions in different flavours.

-- Ray
Find all posts by this user
Quote this message in a reply
06-21-2018, 05:52 AM
Post: #9
RE: Saturn family calculator performance
Hello,

>log(x) -> ? cycles
>exp(x) -> ? cycles
>tan(x) -> ? cycles

Unfortunately, these numbers will vary widely depending on the inputs...
for trig, for example, the input will be "reduced" in 7 1 digit numbers so that
sigma for n=1 to 8 of number(n)*atan(10^-n) ~= initial input
Then, for each of these numbers (which can vary from 0 to 9), it will do a number of addition equal to that number (roughly equivalent to a multiplication).
so the number of loops there varies from 0 to 8*9! which is a Huge variability...

Then, before the output, it might have to calculate 1/sqrt(1+r²), which itself has a lot of variability...

This is of course not even counting the "early exit" cases...

I am sure that, using tools like emu48, you could get some "average" numbers, but they will not be that useful.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
07-04-2018, 06:30 AM (This post was last modified: 07-04-2018 07:04 AM by sasa.)
Post: #10
RE: Saturn family calculator performance
Thank you Cyrille,

In case with branched calculations (depending on input), for an "average" result I tend to use result with specific target value. Without knowing exact used algorithm that is only reasonable and can be obtain some specific performance statistic of interesting.

I find quite difficult work with Emu series of emulators on Linux (perhaps there are some limitations through Wine) in order to receive proper cycle time and set properly breakpoints...

In any event, thank you to all very much for comments and infos.
Find all posts by this user
Quote this message in a reply
07-05-2018, 05:50 AM
Post: #11
RE: Saturn family calculator performance
Hello,

If my memory serves me well, debug4x, which is the development environement that we used ont he 50g and does integrate emu48 does have a cycle counter. So you could use it (I do not remember exactly how it works:-(, and I MADE the thing!)
set 2 breakpoints around the calls to the function that that should work.
or create an ASM program that has number of inputs and do an average of the cycle count trigging them all.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
07-05-2018, 10:01 PM
Post: #12
RE: Saturn family calculator performance
Just as a side question, seeing as I've got one (or more, possibly) of the authors here, when was debug4x first worked on? I know I've had it for a couple of years now. Did you meet the initial aims of the project?

(Post 254)

Regards, BrickViking
HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a)
Visit this user's website Find all posts by this user
Quote this message in a reply
07-06-2018, 06:38 AM
Post: #13
RE: Saturn family calculator performance
Hello,

On the first day, they was nothing... And the developer found it hard...

On the 2nd day, HP used LOTS of money to create the debuger boxes. They would connect to the saturn CPU bus and to unixes servers, and be very slow and hard to use... And the developer found that it was better than nothing!

On the 3rd day,new developers came in, and thought that it was crap. After convincing management, they were told to learn how to program in C and use emu48 to "do something about it". And the result was better than the debuger boxes, a lot cheaper, and could be copied to each developer's PC, and did not need unix.

On the 4th day, the developer thought that MCF development was crap and that Delphi was much better. So he created debug2 (day 3 was debug1 I guess). And showed what could be acheived in 1 day in Delphi in comparison with MFC. And management realised that he was right!

On the 5th, and 6th days (they lasted a while). Debug2 grew and improved, gained numerous features and became wonderfull to use. It got the ability to do native debuging in Sys RPL and other cool features...

On the 7th day, the developer decided to rest, and to give his creation away. And some talented person took it, renamed it to debug 4x (as in 48/49 and the like I guess) and made it it's baby, and loved it, and maintained it for a while, and the developer loved seeing it grow and develop some more!

Cheers,
Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
07-06-2018, 07:41 AM
Post: #14
RE: Saturn family calculator performance
On the eighth day, we all decided that FORTRAN was a better way and we rewrote everything using labels, execute once DO loops and continue statements.


Pauli

Apologies, I couldn't resist...
Find all posts by this user
Quote this message in a reply
07-06-2018, 08:19 AM
Post: #15
RE: Saturn family calculator performance
Thanks Cyrille!
http://www.debug4x.com
Find all posts by this user
Quote this message in a reply
07-07-2018, 06:29 AM (This post was last modified: 07-07-2018 08:25 AM by sasa.)
Post: #16
RE: Saturn family calculator performance
Let be a bit more concrete...

The VERSION command in Emu48 (HP-48GX) emulator returns revision R.

At: https://www.hpcalc.org/hp48/programming/entries/ the last entry is "Very Big List" which should consist list of ROM entry points for this revision.

Entry point for (for instance) ATAN in SupRomEntr.a shows 2AD21 (at least first). Then adding in the breakpoint list, executing ATAN for given value, execution should stop at entered breakpoint. However, it doesn't - emulator simply running continuously. Perhaps because entry point is not what I supposed it is or perhaps there is some bug present (Wine isn't perfect). Also tested other entry points related to ATAN without success.

Without proper entry point or deeply familiar with internal software organization, the debugging function which missing is pending keystroke when emulator is paused, then continuing debugging step by step will eventually lead to desired entry point.
Find all posts by this user
Quote this message in a reply
07-07-2018, 08:14 AM
Post: #17
RE: Saturn family calculator performance
My reference puts the entry point for the UserRPL function ATAN at 1B79C.

SysRPL %ATAN is 2AD21 but when calling this function you have to be absolutely sure that you have a single-precision real number in level 1 of the stack. SysRPL functions perform no sanity checks. They assume that the number and type of values passed to them on the stack are correct and you get totally unpredictable results if this is not the case.
Find all posts by this user
Quote this message in a reply
07-08-2018, 07:13 PM (This post was last modified: 07-08-2018 07:16 PM by sasa.)
Post: #18
RE: Saturn family calculator performance
Thank you very much. That way seems to work fine.

BTW, Kees van der Sanden have a nice overview page shows which version of Saturn was used in which calculator model:
https://www.keesvandersanden.nl/calculators/saturn.php
Find all posts by this user
Quote this message in a reply
07-09-2018, 05:24 AM
Post: #19
RE: Saturn family calculator performance
Hello,

What you want to benchmark is not the sysRPL %ATAN as it does a lot of extra work. Cheif among them being a memory allocation for the result number... which can be very time intensive...

The function that you want to time is most likley cATAN15 (from memory)

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 




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