Stack vs queue -based programming language efficiency [closed]
- by Core Xii
Suppose there are two programming languages; one where the only form of storage is one (preferred) or two (may be required for Turing-completeness) stacks, and another where the only form of storage is a single queue, with appropriate instructions in each to manipulate their respective storage to achieve Turing-completeness.
Which one can more efficiently encode complex algorithms? Such that most given algorithms take less code to implement, less time to compute and less memory to do so.
Also, how do they compare to a language with a traditional array (or unbounded tape, if you will) as storage?