You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@animalize made a more intelligent output buffer for python. It utilizes python lists internally.
The old buffer simply uses a PyMem_Resize call. This has the disadvantage of reallocating the memory every time it is called. When the buffer is grown this way, the data at the beginning is copied quite a lot of times. This means that using larger buffer sizes runs into a limit at some point.
The blocks_output_buffer creates a python list with all the buffer blocks. These are created only once. In the end these blocks are all joined together, requiring only one memcpy call per block. This is not only theoretically faster, but it also turns out to be that way in practice.
The text was updated successfully, but these errors were encountered:
@animalize made a more intelligent output buffer for python. It utilizes python lists internally.
The old buffer simply uses a PyMem_Resize call. This has the disadvantage of reallocating the memory every time it is called. When the buffer is grown this way, the data at the beginning is copied quite a lot of times. This means that using larger buffer sizes runs into a limit at some point.
The blocks_output_buffer creates a python list with all the buffer blocks. These are created only once. In the end these blocks are all joined together, requiring only one memcpy call per block. This is not only theoretically faster, but it also turns out to be that way in practice.
The text was updated successfully, but these errors were encountered: