▼
Posts: 198
Threads: 17
Joined: Oct 2010
What is the stack depth of the HP 50g?
▼
Posts: 1,278
Threads: 44
Joined: Jul 2007
Unlimited (within avail memory).
TW
Posts: 275
Threads: 38
Joined: Jul 2007
Quote:
What is the stack depth of the HP 50g?
I reckon about 7 or 8.
That is, about 7 or 8 on top of one another before the pile becomes too unstable. ;-) (A challenge for HHC2011 methinks?)
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Bruce, you're talking about stack hight. HP did know why they baptized it "stack depth". Way back, in early IT, people here used to translate this stack as "Kellerspeicher". Avoiding instability as well d;-)
▼
Posts: 255
Threads: 59
Joined: Jul 2007
I just have to comment on this thread. When I first read it, I thought Jim was referring to return from subroutine stack depth, not data stack depth. It makes me wonder how my brain work.
Gerry
▼
Posts: 1,248
Threads: 33
Joined: Aug 2007
Your brain work in stacks. (On different levels).
Posts: 198
Threads: 17
Joined: Oct 2010
Sorry for the confusion. Perhaps I should have mentioned some numbers like a stack of 4 (X, Y, Z, T), or 8 (X, Y, Z, T, A, B, C, D) in the "34S" ;-), or more instead of being too general with my question.
Posts: 1,278
Threads: 44
Joined: Jul 2007
Will it blow your mind to hear that you can also have an essentially unlimited "stack" of stacks? :-P
This is what allows you to do things like evaluate expressions and programs for inputs in inform boxes. You couldn't do that on the 48. Essentially, these virtual stacks allow you to save the entire content of a stack very quickly and easily, allow anything to go on in the new stack, and then restore it just as easily.
TW
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Quote:
... these virtual stacks allow you to save the entire content of a stack very quickly and easily, allow anything to go on in the new stack, and then restore it just as easily.
FYI, there are two commands included in v1.13 of wp34s for this purpose already.
Ceterum censeo: ...
Walter
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Quote: FYI, there are two commands included in v1.13 of wp34s for this purpose already.
They've been there longer, just not documented :-)
- Pauli
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
Posts: 255
Threads: 59
Joined: Jul 2007
Tim:
So that means my 49g, 49g+ and 50g are well-stacked machines? I know, that's pretty bad. What's really sad is that my boss here and a coworker do these groaners all day and I've heard them so many times, I know the scripts. Just kill me now...
Gerry
Edited: 2 Feb 2011, 1:37 p.m.
Posts: 528
Threads: 40
Joined: Dec 2008
It looks like the original post was indeed referring to the data stack, but for any readers who are curious, the subroutine stack (also known as the "return stack") depth is also infinite on the 50g - which really means it's limited by memory.
If I recall correctly, objects are stored on one side of a memory pool, and the data stack is stored at the other. They grow towards the center, where the return stack is stored. If the data stack or object store bumps into the return stack, then the return stack is re-centered. This can result in a significant slowdown in processing if you have a VERY deep return stack but in practice, I think that's very rare.
Dave
▼
Posts: 198
Threads: 17
Joined: Oct 2010
That's very interesting, to me at least. I hadn't thought about two different stacks with the one I was asking about being the data stack. Thank you for clarifying it.
|