Currently, all programs execute against a single stack. Adding an alt stack would enable:
More expressive programs where a program could cache values on the alt stack
A relatively simple way of implementing full random access memory (this would also require operation mirroring).
Adding of ALT stack (without mirroring) would require 2 new instructions:
TOALT - to move a value from the main stack to the alt stack
FROMALT - to move a value from the alt stack to the main stack
Impact on performance should be relatively small - maybe up to 5% increase in proof generation time. Proof size should remain un-affected for programs which don't make use of the alt stack.
Currently, all programs execute against a single stack. Adding an alt stack would enable:
Adding of ALT stack (without mirroring) would require 2 new instructions:
TOALT
- to move a value from the main stack to the alt stackFROMALT
- to move a value from the alt stack to the main stackImpact on performance should be relatively small - maybe up to 5% increase in proof generation time. Proof size should remain un-affected for programs which don't make use of the alt stack.