3 ms·
> Understands and uses Python's memory management and optimization techniques. What are these?
by NoboruWataya 3y ago
> Understands and uses Python's memory management and optimization techniques.
What are these?
- 0cf8612b2e1e 3y agoMaybe generators? I could kind of see an argument for some tricks like using tuples or slots to save memory. Anything in functools? Those are all under the heading of conserving memory, nothing to do with explicit memory management. If I needed that tight of control, I would not be writing Python.
- JonChesterfield 3y agoRewriting in C++ while regretting prior and current life choices, primarily. Probably a module at a time.
- __loam 3y agoWrite your program in a language other than Python.
- iamcreasy 3y agoOne example could be small integer caching [1,2]. [1] https://realpython.com/lessons/small-integer-caching/#description https://realpython.com/lessons/small-integer-caching/#descri... [2] https://docs.python.org/3/c-api/long.html#c.PyLong_FromLong https://docs.python.org/3/c-api/long.html#c.PyLong_FromLong