Daily Shaarli

All links of one day in a single page.

December 9, 2018

Mergify.io

Merge your code efficiently

High-Performance in Python with Zero-Copy and the Buffer Protocol

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_