Both stacks and stacks are places where Java is used to store data in Ram.
The stack mainly stores some basic types of variables (INT, short, long, byte, float, double, Boolean, char ). Data in the stack can be shared. The advantage of stack is that the access speed is faster than that of stack, second only to register, and stack data can be shared. However, the disadvantage is that the data size and lifetime in the stack must be fixed, and there is a lack of flexibility.
A heap is a runtime data zone and class (the object allocates space from it. Because the memory needs to be dynamically allocated at runtime, the access speed is slow. Data in the stack can be shared.
Stack is allocated space during compilation, while stack is dynamically allocated (space allocated during runtime), so the stack speed is fast.
The CPU has a dedicated register (ESP, EBP) to operate the stack. The stack uses indirect addressing. Stack faster.
Why is the difference between stack and the efficiency of the derived stack higher than stack?