Post Reply 
HP 50g Programming Methods???
11-07-2017, 04:47 AM
Post: #14
RE: HP 50g Programming Methods???
(11-06-2017 09:30 PM)David Hayden Wrote:  A very rough rule of thumb is that SysRPL is about 5 times faster than UserRPL; Saturn assembly is about 5 times faster than SysRPL, and ARM assembly (or C code) is about 5 times faster than Saturn assembly.
I think you are a couple orders of magnitude short on the speed of C/ARM Assembler. The HPMuseum Calculator Benchmark by Xerxes gives a pretty good idea of relative speeds of various languages.

(11-06-2017 09:30 PM)David Hayden Wrote:  HPGCC has an interesting trade-off: programs are about 100 times faster than their UserRPL equivalents, but they are also about 100 times larger. You can avoid taking the space in your HOME directory by storing the programs on an SD card, but you still need the RAM to run them. I find that it takes about 0.25s to load a C program from the SD card.
This paragraph doesn't apply to hpgcc3, where programs have a size around 30% larger than sysRPL while keeping the speed advantage.

(11-06-2017 09:30 PM)David Hayden Wrote:  When using C code, it's best to have a UserRPL or SysRPL driver program that handles the user interface stuff and then just do the computing in C. I'll also toot my horn and suggest my hpobjects library for hpgcc2. The library makes it relatively easy to read and write calculator objects with your C program.
http://www.hpcalc.org/details/7177

Actually, hpgcc 2.0 is more useful when creating the user interface in C. Entering/exiting the C program has a significant overhead, so going back and forth from UserRPL to C is probably not the best idea. HPGCC3 solves this issue, with very light overhead and small program size. This is much better suited to code small routines and call them in a tight loop from userRPL.

Each has its separate target audiences: hpgcc2 is easier to get started on, but less refined (big executables) and cumbersome to use (need a library and run the C code through another command). It's easy to publish code for others to run.
hpgcc3 takes a bit longer to setup, since you have to compile your own ROM, but once you get to the point to compile the ROM, you are ready to code with a complete IDE environment. It's much more refined (programs evaluated with EVAL just like any other program, faster startup, smaller size, more complete libraries, easier to port C programs from other platforms, etc), but publishing programs is a bit more difficult since final users need to have an hpgcc3 modified ROM, which is not published. Now that the 50g is discontinued, perhaps uploading an hpgcc3 ROM to hpcalc.org wouldn't trigger any response from HP. This would make it just as easy for final users.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 50g Programming Methods??? - Carsen - 11-04-2017, 01:38 AM
RE: HP 50g Programming Methods??? - pier4r - 11-04-2017, 08:04 AM
RE: HP 50g Programming Methods??? - Helix - 11-04-2017, 10:22 PM
RE: HP 50g Programming Methods??? - Arno K - 11-04-2017, 12:58 PM
RE: HP 50g Programming Methods??? - pier4r - 11-04-2017, 01:01 PM
RE: HP 50g Programming Methods??? - Arno K - 11-04-2017, 02:32 PM
RE: HP 50g Programming Methods??? - DavidM - 11-04-2017, 05:02 PM
RE: HP 50g Programming Methods??? - Carsen - 11-05-2017, 06:07 AM
RE: HP 50g Programming Methods??? - DavidM - 11-05-2017, 04:54 PM
RE: HP 50g Programming Methods??? - Claudio L. - 11-07-2017 04:47 AM
RE: HP 50g Programming Methods??? - Carsen - 11-07-2017, 09:11 PM
RE: HP 50g Programming Methods??? - Carsen - 11-10-2017, 05:43 AM
RE: HP 50g Programming Methods??? - pier4r - 11-10-2017, 07:57 PM
RE: HP 50g Programming Methods??? - Carsen - 11-12-2017, 08:07 PM



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