About memory pressure, lock contention, and Data-oriented Design
3 points
1 hour ago
| 1 comment
| mnt.io
| HN
Hywan
1 hour ago
[-]
In this article, I illustrate how Data-oriented Design helped to remove annoying memory pressure and lock contention in multiple sorters used in the Matrix Rust SDK. It has improved the execution by 98.7% (53ms to 676µs) and the throughput by 7718.5% (from 18K elem/s to 1.4M elem/s)! I will talk about how the different memories work, how we want to make the CPU caches happy, and how we can workaround locks when they are a performance bottleneck.
reply