3 ms·
I don't know why you are downvoted (at the time of this writing). That's a very good point and makes the simple Python solution feasible on many more computers
by Jtsummers 2y ago
I don't know why you are downvoted (at the time of this writing). That's a very good point and makes the simple Python solution feasible on many more computers (due to reduced memory footprint). It's also a straightforward pass (once you know what liveness analysis is). Since there are no loops it's just one pass starting from the end and working backwards to determine whether a variable is live or not, and then an extra check on each iteration to decide whether to delete particular arrays.
- tekknolagi 2y agoI think getting downvoted (not by me) because if you scroll to the end of the post, that's the very first submission (by me).
- Jtsummers 2y agoAh, fair. I didn't catch that.