CS 3304: Comparative Languages
Implementing Subprograms
[
Course Documents
] : [
Implementing Subprograms
]
Previous
Contents
Next
Keyword Index
Static Chain vs. Display
References to locals
Not much difference
References to nonlocals
If it is one level away, they are equal
If it is farther away, the display is faster
Display is better for time-critical code, because all nonlocal references cost the same
Procedure calls
Speed is about the same
Display uses more memory
Procedure returns
Both have fixed time, but the static chain is slightly faster
Overall: Static chain is better, unless the display can be kept in registers