5 ms·
These are all true, but you’re missing the main one. “Apple Silicon” is very highly optimized for strict reference counting (instead of garbage collection). Th
by Eric_WVGG 5y ago
These are all true, but you’re missing the main one.
“Apple Silicon” is very highly optimized for strict reference counting (instead of garbage collection). The retain/release performance is just off-the-wall — even in Rosetta. Details here: https://blog.metaobject.com/2020/11/m1-memory-and-performance.html https://blog.metaobject.com/2020/11/m1-memory-and-performanc...
Anecdotally, I spent most of last year in Docker, XCode and Node on an 8gb Air, smoove sailing
- uniqueuid 5y agoThat's true, I forgot that! There's also this informative comment [1] from the post author (Marcel Weiher) explaining some details: "This doesn't use less RAM, it decreases the performance cost of using the more frugal RC." [1] https://news.ycombinator.com/item?id=25208007 https://news.ycombinator.com/item?id=25208007
- CraigJPerry 5y agoNow that’s a piece of the puzzle i hadn’t heard of before. I knew about the memory compression, and iStat menus does a decent job of visualising it but this, this is new to me. HN is such a useful community for finding little tidbits of brain candy like this.
- tempnow987 5y agoInteresting. I don't think retain/release itself is helping with the memory, but reference counting very much seems like it would, and the retain / release speed makes that possible? It's kind of crazy how well 8GB does. On a PC when you have all the pre-installed crapware +++ 8GB is really too low these days.
- disgruntledphd2 5y agoSortof. I personally dislike the way it won't kill ridiculous processes, and "merely" slows everything down massively. To be fair, I'm doing DS on this so end up dealing with really large in-memory datasets, so I hit this relatively often.
- tempnow987 5y agoThat use case is tough for this model for sure. You're not tempted to remote to some other box with more memory? It's not hard to buy / spin up a box.
- disgruntledphd2 5y agoOh yeah, that's what I tend to do since I discovered this problem. It's a pretty small company, so they'd prefer that I didn't keep large boxes running constantly though (which is fair). They're getting me the new MB Pro with 32gb of RAM, which will definitely help.
- reitzensteinm 5y agoI don't think that's at all the main one given OP's list of apps. It'll accelerate things built in Apple's Swift/ObjC ecosystem, but it's not going to help node, android, react native toolchain, etc. And regardless of that, the instructions speed the atomic operations required when updating references in a mulithreaded environment. It's lowering active CPU use. They're not going to do anything to reduce the impact of a mostly idle application in the background on the rest of the system. The reference counting mechanism itself does mean you don't have to walk memory as much to do garbage collection, which risks pulling rarely used memory back in from swap. But that was true on the Intel Macs, too.
- saagarjha 5y agoMaking atomics (and thus reference counting) fast is absolutely not the "main" benefit of Apple silicon.