liveBook · Manning

Wrap-around

As explained in Fast Python: High performance techniques for large datasets

Wrap-around is a boundary-indexing technique that connects opposite edges of a finite grid so indexing past one edge continues at the other edge.

Wrap-around lets grid code continue indexing across opposite edges, avoiding explicit boundary tests. In Cython, however, wrap-around can invoke CPython machinery and prevent GIL release, making the optimized loop slower. section 5.6.1

QuadLife update

The QuadLife implementation builds extended_world before computing new_world, trading extra memory and copying for a simpler and faster core computation. section 5.6.1

How Fast Python: High performance techniques for large datasets covers it

How deep it goes
Explains implementation and performance trade-offs, but stops short of broader indexing semantics.
Examples
Uses an extended QuadLife board with copied edges and corners as the concrete implementation.
What it assumes
Assumes typed Cython and array-based grid processing, while demonstrating the boundary-handling transformation directly.
What you can do after
Apply explicit border copying to simplify a Cython grid kernel and assess its memory and copying costs.
How it connects
Connects wrap-around with Cython, GIL release, bounds checking, memoryviews, and NumPy arrays.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fast Python: High performance techniques for large datasets. The section links point to the parts of the book it draws on.