Python Dataclasses: Immutable Value Objects with Frozen Instances, Default Factories, and Slots
A practical guide to using frozen dataclasses, default_factory for mutable defaults, and slots to cut memory and bugs in Python 3.7+ codebases.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
A practical guide to using frozen dataclasses, default_factory for mutable defaults, and slots to cut memory and bugs in Python 3.7+ codebases.
Substring() copies data to the heap. ReadOnlySpan<T> gives you a view into the original buffer instead. Here is how that changes parsing loops, where it stops working, and how to verify the difference.
Build a stable, memory‑efficient merge sort in Python that works for millions of elements. The guide covers prerequisites, an iterative implementation, stability checks, memory profiling, and recovery strategies.
Learn how to use pandas.read_csv(..., chunksize=N) to process large CSV files incrementally, keep RAM low, aggregate on the fly, and avoid common pitfalls.
ScriptableObjects in Unity centralize shared data into a single project asset, reducing memory usage and enabling designer-driven workflows without code changes.
Goal Convert a large Python iterable (e.g., a list with >10⁷ elements) to a NumPy ndarray while keeping peak memory usage low and avoiding unnecessary latency. Constraints and uncertainty numpy.array() always copies the input, doubling memory temporarily. numpy.asarray() avoids a copy only when the source is already an ndarray, which does not help for pla