2 ms·
Many immutable algorithms replace arrays with trees. Trees are pointer-heavy, and pointers are less cache-friendly than arrays. Memory access is often over 100
by barrkel 13y ago
Many immutable algorithms replace arrays with trees. Trees are pointer-heavy, and pointers are less cache-friendly than arrays.
Memory access is often over 100x the cost of an L1 cache hit. It doesn't take too many of those to make a big difference if you're CPU bound.
My comments are general, I'm sure Clojure has access to arrays where necessary for interop at least.
- stcredzero 13y agoAgain, true, but the big problem I'm facing isn't raw performance so much as it's guaranteed latency.