4 ms·
In many cases the memory usage is linear with input data, so you can come up with a function that predicts memory usage, add some padding, and then you don't ne
by itamarst 6y ago
In many cases the memory usage is linear with input data, so you can come up with a function that predicts memory usage, add some padding, and then you don't need retries. E.g. this example here: https://pythonspeed.com/articles/estimating-memory-usage/ https://pythonspeed.com/articles/estimating-memory-usage/