Re:Apple CPU tricks: memory reordering, JavaScript support, ...
by spankalee on Friday November 27, 2020 @07:10PM
(#25233802)
For an the references to this, I haven't yet seen a description of what the optimization is. Anyone know?
[ Parent
| on HN ]
Re:Apple CPU tricks: memory reordering, JavaScript support, ...
by _kbh_ on Friday November 27, 2020 @07:42PM
(#25234014)
I think I found the answer in this tweet.
https://twitter.com/Catfish_Man/status/1326298205034696705
Heres a snipped quote.
"this further improvement is because uncontended acquire-release atomics are about the same speed as regular load/store on A14"
Re:Apple CPU tricks: memory reordering, JavaScript support, ...
by annilt on Friday November 27, 2020 @09:11PM
(#25234539)
x86 has total store order, all stores are queued(store buffer) in the CPU and then pushed to the cache subsystem. Last item has to wait previous ones. Arm doesn’t have TSO, so CPU can reorder stores in the queue or issue stores out of order etc. depending on memory barrier use.
Re:Apple CPU tricks: memory reordering, JavaScript support, ...
by olliej on Friday November 27, 2020 @09:52PM
(#25234800)
If you read the Catfish_Man tweet, he says that even under rosetta refcounting is faster, and under rosetta M1 has TSO.
Re:Apple CPU tricks: memory reordering, JavaScript support, ...
by tambourine_man on Friday November 27, 2020 @07:36PM
(#25233971)
It’s much more than twice as fast.
https://twitter.com/catfish_man/status/1326238434235568128?s...
Re:Apple CPU tricks: memory reordering, JavaScript support, ...
by spankalee on Friday November 27, 2020 @07:41PM
(#25234001)
What's the actual optimization though?
Re:Apple CPU tricks: memory reordering, JavaScript support, ...
by plasma on Friday November 27, 2020 @08:03PM
(#25234158)
The tweet author in the linked thread later writes:
"Weaker memory model makes acquire-release atomics possible to implement much more efficiently, in exchange for not hiding some classes of multithreading bugs"
Re:Apple CPU tricks: memory reordering, JavaScript support, ...
by tambourine_man on Friday November 27, 2020 @07:48PM
(#25234053)
Have you read the tweet and thread? If so, I don’t understand what you’re asking.