The first step, is to stop allocating "memory", and start allocating specific somethings else. Consider the usage pattern:
interleaving them has no cache benefits, and makes it difficult
,这一点在快连下载安装中也有详细论述
// not critical but safer when bytesToWrite != view.byteLength
Games and physics simulations need to detect which objects are touching or overlapping. With nnn objects, checking every pair is O(n2)O(n^2)O(n2) comparisons, which gets expensive fast. A hundred objects means roughly 5,000 pair checks. A thousand means nearly 500,000.