boa icon indicating copy to clipboard operation
boa copied to clipboard

Reduce environment allocations

Open raskad opened this issue 5 months ago • 1 comments

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

raskad avatar Sep 22 '24 23:09 raskad