Live data from Hacker News

Apple Silicon M1: Black Magic Fuckery

singhkays.com

591–600 of 1001 posts

Re: Apple Silicon M1: Black Magic Fuckery

#591
post #448

This is fascinating: > Retain and release are tiny actions that almost all software, on all Apple platforms, does all the time. ….. The Apple Silicon system architecture is designed to make these operations as fast as possible. It’s not so much that Intel’s x86 architecture is a bad fit for Apple’s software frameworks, as that Apple Silicon is designed to be a bespoke fit for it …. retaining and releasing NSObjects i…

I, for one would love to see an M1 chip cripple itself under the memory load of 4 intellij windows and chrome tabs, among other applications.

That's my take as well; I have a fairly modern Macbook, it's just fine, it's just that the software I run on it is far from ideal.

Intellij has a ton of features but it's pretty heavyweight because of it; I'd like a properly built native IDE with user experience speed at the forefront. That's what I loved about Sublime Text. But I also like an IDE for all the help it gives me, things that the alternative editors don't do yet.

I've used VS Code for a while as well, it's faster than Atom at least but it's still web technology which feels like a TON of overhead that no amount of hardware can compensate for.

I've heard of Nova, but apparently I installed it and forgot to actually work with the trial so I have no clue how well it works. I also doubt it works for my particular needs, which intellij doesn't have a problem with (old codebase with >10K LOC files of php 5.2 code and tons of bad JS, new codebase with Go and Typescript / React).

Re: Apple Silicon M1: Black Magic Fuckery

#592

Earlier quoted context omitted.

I'm wondering if the "optimized for reference-counting" thing applies to other languages too. i.e. if I write a piece of software in Rust, and I make use of Rc , will Macs be extra tolerant of that overhead? In theory it seems like the answer should be yes

Yes, it applies to everything which uses atomics and is not something special in the runtime. It's also worth noting that this is an optimization that iphones have had for the last few years ever since those switched to arm64.

The fast atomics are relatively new.

Re: Apple Silicon M1: Black Magic Fuckery

#593

Tin foil hat warning - but how much of the M1 performance improvement is from optimizations made in Big Sur for Apple Silicon that they just didn't bother implementing for x86 since it's now the outgoing technology for Apple? I realize the reducing in power consumed for any given quantity of work is downright amazing for laptops, but I guess I'm more curious about workstation and (build) server kinds of applications.…

Apple has been using x86 for practically 15 years now. Your theory is this whole time they've been too lazy to bother to implement "god mode" ? What about Windows and Linux on x86? Also too lazy? It can be fun to put on the tin foil hat, but at least make sure the theory makes even a little bit of sense first.

I was not saying in any way that they didn't implement optimizations for x86 over the time that they used them. Of course they did.

What I meant was that Apple themselves talked about significant optimization for Apple Silicon in Big Sur. The question is if any of these optimizations could have also been applied to x86 but aren't because x86 is the outgoing platform.

I'm skeptical of the assertion (without supporting documentation) that there is some hardware design choice in Apple Silicon that makes it _drastically_ more memory (quantity) efficient than x86 when using presumably the same kernel, same toolchain frameworks (LLVM), etc.

Re: Apple Silicon M1: Black Magic Fuckery

#594

Earlier quoted context omitted.

The parent was complaining about being forced to use OS X. So, the "walled garden" is intended for the underlying hardware.

> So, the "walled garden" is intended for the underlying hardware. I don't think that is what he was saying at all. Regardless. There is nothing preventing Linux (or Windows) from booting on Mac M1 hardware. People almost certainly will have Linux running on Mac hardware before too long. It's just a slog getting it working well. Not a walled garden in any traditional sense, just difficult to implement.

I think they have been clear about boot camp not being supported, at least at present time. But they have also said that it is possible to run Windows, but that it will be up to Microsoft.

Re: Apple Silicon M1: Black Magic Fuckery

#595

This is fascinating: > Retain and release are tiny actions that almost all software, on all Apple platforms, does all the time. ….. The Apple Silicon system architecture is designed to make these operations as fast as possible. It’s not so much that Intel’s x86 architecture is a bad fit for Apple’s software frameworks, as that Apple Silicon is designed to be a bespoke fit for it …. retaining and releasing NSObjects i…

I don't think this applies to good software. Nobody will retain/release something in a tight loop. And typical retain/releases don't consume much time. Of course it improves metrics like any other micro-optimization, so it's good to have it, but that's about it.

Retains and releases often happen across function call boundaries.

Re: Apple Silicon M1: Black Magic Fuckery

#596

Earlier quoted context omitted.

The parent was complaining about being forced to use OS X. So, the "walled garden" is intended for the underlying hardware.

> So, the "walled garden" is intended for the underlying hardware. I don't think that is what he was saying at all. Regardless. There is nothing preventing Linux (or Windows) from booting on Mac M1 hardware. People almost certainly will have Linux running on Mac hardware before too long. It's just a slog getting it working well. Not a walled garden in any traditional sense, just difficult to implement.

Linus has openly said he wants Linux running on one: https://hardware.slashdot.org/story/20/11/24/2225209/linus-t...

Re: Apple Silicon M1: Black Magic Fuckery

#597

This is fascinating: > Retain and release are tiny actions that almost all software, on all Apple platforms, does all the time. ….. The Apple Silicon system architecture is designed to make these operations as fast as possible. It’s not so much that Intel’s x86 architecture is a bad fit for Apple’s software frameworks, as that Apple Silicon is designed to be a bespoke fit for it …. retaining and releasing NSObjects i…

At the hardware level, does this mean they have a much faster TLB than competing CPU's, perhaps optimized to patterns in which NSObjects are allocated? Speaking of which, does Apple use a custom malloc or one of the popular implementations like C malloc, tcmalloc, jemalloc, etc.?

Apple uses its own libmalloc: https://opensource.apple.com/tarballs/libmalloc/

Re: Apple Silicon M1: Black Magic Fuckery

#598

Earlier quoted context omitted.

If you don't have issues with paying a lot for hardware, why don't you buy Mac Pro?

A machine that wont outperform the new mini $6000 16 cores 32GB of ram least powerful gpu on the list 2GB of storage $8,799.00 28 cores 48GB of ram same gpu 4GB of storage $14,699 MSRP on a 2020 Toyota Corolla $19,600 AMD Ryzen Threadripper 3970X 32-Core 3.7 GHz Socket sTRX4 $2,629.90 Cost of the same basic GPU about $219 Cost of complete system equivalent to the almost car priced mac about 4200. 9k-15k isn't "a lot"…

Yes and no. 15k hardware is for people who are using it professionally. By "professionally" I mean that they can throw such purchase into their cost and just pay less tax. From my perspective it does not matter if I pay ~15k to tax office or to Apple.

In Europe the incentives to buy expensive goods as a company (like cars, fancy office furniture, etc.) is even bigger because of VAT tax (much bigger than US sales tax).

Re: Apple Silicon M1: Black Magic Fuckery

#599

PSA: however impressive the M1 hardware is, you're still going to be stuck using OSX, playing in Apple's walled garden and being subjected to their awful policies. I'll gladly join the groupie crowd once Linux runs stable on it.

> Apple's walled garden Apparently over the years the definition of "Walled Garden" has drifted a lot. The iPhone has a "Walled Garden", unless you jailbreak, it's very difficult to run anything outside the App Store. My Mac? Almost nothing I run is from the App Store. Nothing needs to be from the App Store. Most of what I run doesn't even go through Gatekeeper and it certainly never touches software I build or compi…

> My Mac? Almost nothing I run is from the App Store.

For now.

Re: Apple Silicon M1: Black Magic Fuckery

#600

One of the things I've noticed recently, and especially since the CPU space started finally moving again is how much of a divide there now is between the computer literate, and the computer illiterate. It probably creates a social divide at least that which existed when the majority of people couldn't read or write, and is just as "not OK". Example of this in the first paragraph of this article: > For everyday users…

A more apt analogy would be "for everyday users who just want to record their expenses, keep a journal, and sketch some drawings, paper and pencil have been perfectly fine for the last century". Understanding how computers work down to being able to describe L1 instruction caches and how prefetching works and why having an 8 instruction wide decoder pulling from a giant L1I cache isn't really relevant to empowering p…

>You seem to be insinuating that, used to, people were "more literate" and are becoming more ignorant.

No, I'm saying the goalposts moved - a lot. The same way widespread reading and writing moved the goalposts back in the day.

>How does not understanding how computers work limit people?

It puts them in the class that considers computers to be magic, like not knowing how to read and write put people in a class that considered industrial machinery and accounting to be magic.

In a world where computers do all the high paid jobs..... thats as low a class as being generally illiterate.

To put it really simply "computer illiterate" Is now a thing.

Actual written definition being: not able to use computers well, or not understanding basic things about computers

Didn't used to be. Wonder when it was added https://dictionary.cambridge.org/dictionary/english/computer...

edit:March 2008 https://public.oed.com/updates/new-words-list-march-2008/

Post reply on HN