Best calculator for recurrence relations
|
02-26-2020, 03:28 PM
Post: #15
|
|||
|
|||
RE: Best calculator for recurrence relations
This program seemed like a good example of where pre-compiling the executable passed to SEQ would help, so I decided to try a version that did that:
Code: \<< "Precompiling" the symbolic expression is done with the →PRG command (on page 3 of the built-in Development Library menu [#256]). There's a subtlety here that needs to be noted: the variables in the symbolic will be compiled as either globals or locals depending on the context of where they are used in the program. That's why I went ahead and pre-allocated the locals in this version -- this ensures that the compiled program will correctly use locals as opposed to globals when it is executed by SEQ. This issue can be explicitly dealt with by using "precompiled locals", but I believe that syntax gets more messy than it's worth in situations like this. Precompiling the executable makes this version about 59% faster on my 50g. There was also a redundant R→I in the original version which was removed. That impact was negligible, though. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)