HP questions about program execution speed.
|
10-25-2017, 01:10 PM
Post: #1
|
|||
|
|||
HP questions about program execution speed.
1. If running a Home program using Home instructions to execute an algorithm or a CAS program using CAS instructions, which runs faster, the CAS program or the Home program. e.g. Using increment in CAS vs x:=x+1 in Home.
2. If running a CAS program or a Home program, but this time using the same instructions, which is faster. 3. If using a mix of CAS and Home instructions, but the same instructions in both CAS and Home versions, does the Home program run slower if it has to use CAS.function() in the Home version instead of just function() in the CAS version. Thanks -Donald |
|||
10-25-2017, 01:49 PM
(This post was last modified: 10-25-2017 01:50 PM by parisse.)
Post: #2
|
|||
|
|||
RE: HP questions about program execution speed.
Home programs are faster than CAS equivalents, except if you can replace inner loops by one CAS command. I have implemented some optimizations for for loops in giac that should make the difference less sensible, they will probably be available in a future firmware...
|
|||
10-25-2017, 06:42 PM
(This post was last modified: 10-25-2017 06:44 PM by Tim Wessman.)
Post: #3
|
|||
|
|||
RE: HP questions about program execution speed.
1/2. HOME will be faster always*(have yet to find something equivalent where it is not) for equivalent operations. Less checking of object types, parsing is faster, execution has less overhead, less memory allocations, etc.
3. The largest slowdown from mixing CAS/HOME stuff is that when passing variables to the CAS, or back to HOME, an object converter will convert between home objects/cas objects. This is by necessity much slower due to large amount of work/checking that happens to make things work "pretty much" the way you expect. So for max performance, avoid doing critical time loops that have any sort of mixing/matching and stay in one side of the other for the duration of a loop to the extent possible. TW Although I work for HP, the views and opinions I post here are my own. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)