HP Forums

Full Version: HP 50g stack depth
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

What is the stack depth of the HP 50g?

Unlimited (within avail memory).

TW

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?)

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;-)

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

Your brain work in stacks. (On different levels).

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.

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

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

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

d:-)

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

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.

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.