Re: [stack] A question on joy syntax.
John Cowan <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
Taoufik Dachraoui scripsit: > In the second definition we explicitly manipulate the stack (dup) so > that the remaining code finds the stack in the expected state. In > this case dup is certainly faster than saving and restoring the > stack, but in other situations this may not be true. In fact, for Joy the stack is just another linked list in the heap, so saving and restoring it is just a matter of storing the stack pointer in a local variable. So both operations are approximately O(1). -- Andrew Watt on Microsoft: John Cowan Never in the field of human computing [email protected] has so much been paid by so many http://www.ccil.org/~cowan to so few! (pace Winston Churchill)