Next: 1.6 Dictionaries Up: 1.5 Stacks Previous: 1.5.2 Using stacks as Contents Index

## 1.5.3 Using the operand stack as two stacks

The ability to efficiently manipulate both ends of the operand stack means that the operand stack can effectively be thought of as two stacks. This can be very useful in situations where more than a handful of objects are being manipulated, and an additional location to temporarily stash objects would be useful. If a program is repeatedly doing large stack rolls or rotations, using the bottom of the stack can often help to simplify the code and reduce stack manipulation overhead.