Weekly Shaarli
Week 49 (December 3, 2018)
Merge your code efficiently
A new OS for connected devices. Create a greener, safer and faster interconnected world with SynapOS., the new opereating system for a new connected world.
(MicroPython)
Whatever your programs are doing, they often have to deal with vast amounts of
data. This data is usually represented and manipulated in the form of strings.
However, handling such a large quantity of input in strings can be very
ineffective once you start manipulating them by copying, slicing, and modifying.
Why?
Let's consider a small program which reads a large file of binary data, and
copies it partially into another file. To examine out the memory usage of this
program, we will use memory_
We found our hard to diagnose Python memory leak problem in numpy and numba using C/C++. It turned out that the numpy array resulting from the above operation was being passed to a numba generator compiled in "nopython" mode. This generator was not being iterated to completion, which caused the leak.