boa
boa copied to clipboard
Reduce environment allocations
This PR builds on #3988 and removes runtime environment allocations when possible. All three commits can be reviewd independently. I just put them all together here, because they depend on each other anyways.
Running the benchmarks did not show a big reduction in execution time, but this should reduce memory usage since we can skip and reduce size of allocations.
- Skip environment creation when all bindings in the scope are local
- Skip environment creation when possible for arrow functions
- Do not allocate space for local bindings in runtime environments