3 ms·
No. M1/2/3 has data memory-dependent prefetcher[0] which can speculatively chase pointers in contiguous memory ranges, reducing indirection cost provided the da
by neonsunset 2y ago
No. M1/2/3 has data memory-dependent prefetcher[0] which can speculatively chase pointers in contiguous memory ranges, reducing indirection cost provided the data there is homogenous, looks like pointers and prefetch attempts are successful per cache line. It also has extra good indirect load predictor.
These have little to do with memory packaging and a lot to do with cache and prefetching architecture.
It does have one of the lowest latencies for atomics[1][2] which is something Swift cares about, but the overall core design just as much benefits other, less indirection and synchronization heavy languages (side note: Swift and Java are closer with each other in defaulting to virtual dispatch, where-as C# sits in the middle of the road with static dispatch by default but some code heavily using interfaces and virtual methods which do make such calls virtual to an extent (JIT has DPGO to devirtualize, AOT can uncoinditionally devirtualize in certain scenarios too, similar to what Swift's WMO does)).
[0] https://gofetch.fail/files/gofetch.pdf https://gofetch.fail/files/gofetch.pdf
[1] https://dougallj.github.io/applecpu/measurements/firestorm/DMB_ISH.html https://dougallj.github.io/applecpu/measurements/firestorm/D...
[2] https://dougallj.github.io/applecpu/measurements/firestorm/CASAL_64.html https://dougallj.github.io/applecpu/measurements/firestorm/C...