RPL programming questions
|
02-19-2014, 09:52 AM
(This post was last modified: 02-19-2014 09:53 AM by HP67.)
Post: #8
|
|||
|
|||
RE: RPL programming questions
Peacecalc, DavidM, thank you both very much for taking the time to write and test code and show your results! I really appreciate it.
Curiously, David's example of locals is faster than Peacecalc's example using the stack only. This does not seem to make sense. David wrote: "IMHO, the real time savings for local variables comes when coding in SysRPL. SysRPL code can access locals in a special way that uses an offset table instead of named variables. This significantly reduces the time to locate the objects in memory. These locals have no names, and are referenced by a numerical index instead." This is what I have been asking about. I suppose but am not certain that a local variable takes more space than a stack item if not at least for creating a name and some method of pointing to the value. That's the storage cost over a stack entry. And there is also the issue of how the variables are accessed by name. Can anybody explain these two issues further? How much extra storage is required for a local variable vs. a stack entry, and how much time cost is there in locating the local variable and placing it on the stack? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)