I can certainly see how that would substantially reduce cpu and memory cost but the code would execute 50-250x slower.
https://bellard.org/quickjs/bench.html
If startup time is relevant to you then you are probably not doing much computation in the first place.
I can certainly see how that would substantially reduce cpu and memory cost but the code would execute 50-250x slower.