← Back to context

Comment by Dylan16807

5 hours ago

5.1 had function environments, then 5.2 changed them from a hidden value to a hardcoded variable name that was easier to change. How did that add extra indirection or slow anything down?

If the environment is ever reified, the JIT compiler can no longer make optimizing assumptions about the variables. It can no longer do things like flatten them out to fixed memory addresses. Since action at a distance can change the bindings dynamically, variables become full hash table lookups.