3 ms·
> allocates slabs of memory up front and then avoids frequent tiny allocations anywhere near hot loops. My observation was intended primarily as a pedagogic cr
by throwawaygh 4y ago
> allocates slabs of memory up front and then avoids frequent tiny allocations anywhere near hot loops.
My observation was intended primarily as a pedagogic critique. The C solutions to these problems don't require any cleverness and are transliterations of the Python equivalents.
I agree re: optimizers of course. The article would be better if the final example was something where even really cleverly optimized "is this really correct?" enumeration techniques under-performed the optimizer.