Live data from Hacker News

Ask HN: How did Apple manage to create such a better chip than Intel?

news.ycombinator.com

71–80 of 87 posts

Re: Ask HN: How did Apple manage to create such a better chip than Intel?

#71
post #57
post #50

ARM is RISC , Intel and AMD are CISC, One important reason is their new pipelining facility. Apple M1 has 16 units that can pipeline their instructions. Meaning, they can reorder sequential instructions that aren't dependent on each other to run in parallel. That is not threads or anything, that can be and is being done in a single threaded program. AMD and Intel have 4 units for reordering tops, because their archit…

1) There’s not a meaningful difference between RISC and CISC on modern architectures. CISC has certain advantages these days because they are compact at encoding memory operations. Intel and AMD crack instructions into operations called micro-ops. There is no meaningful difference between how easy it is to reorder the micro-ops versus RISC ops. CISC or RISC, the internal structures of the processor operate on somethi…

I disagree, here's why:

CISC instruction in are still variable length. People can argue that micro-ops are RISC like, but micro-code is an implementation detail very close to hardware.

One of the key ideas of RISC was to push a lot of heavy lifting over to the compiler. That is still the case. Micro-ops cannot be re-arranged by the compiler for optimal execution.

Time is more critical when running micro-ops than when compiling. It is an obvious advantage in making it possible for advance compiler to rearrange code rather than relying on precious silicon to do it.

While RISC processors have gotten more specialized instructions over the years, e.g. for vector processing. They still lack the complexity of memory access modes that many CISC instructions have.

Re: Ask HN: How did Apple manage to create such a better chip than Intel?

#72

Earlier quoted context omitted.

Right the M1 is based on A14 - the iPhone/iPad chip. It’s just the first PC one based on that architecture. Making top of the line mobile chips has given them a huge efficiency leg up. The SoC also gives big gains compared to a traditional separation of memory modules and CPUs

SoC doesn't make as large of a difference as you'd think. The only place you really get hammered is if your moving a lot of memory between separate memory domains. As a real world example the X360 had a unified memory architecture and PS3 had a split along system/gpu. From a CPU performance perspective they were pretty close(although the SPUs in the PS3 could really go if you vectorized your data for them appropriate…

SoC doesn't make as large of a difference as you'd think.

There are now enough transistors on chip for a reasonably good on-chip GPU. Plus you get better bandwidth between CPU and GPU. This is independent of the instruction architecture. The PS5's SOIC does some of the same things, though it's an x86 instruction set, not ARM.

Neither the PS5 nor the Xbox use AMD CPUs. Intel has a big problem.

Re: Ask HN: How did Apple manage to create such a better chip than Intel?

#73
post #72

Earlier quoted context omitted.

SoC doesn't make as large of a difference as you'd think. The only place you really get hammered is if your moving a lot of memory between separate memory domains. As a real world example the X360 had a unified memory architecture and PS3 had a split along system/gpu. From a CPU performance perspective they were pretty close(although the SPUs in the PS3 could really go if you vectorized your data for them appropriate…

SoC doesn't make as large of a difference as you'd think. There are now enough transistors on chip for a reasonably good on-chip GPU. Plus you get better bandwidth between CPU and GPU. This is independent of the instruction architecture. The PS5's SOIC does some of the same things, though it's an x86 instruction set, not ARM. Neither the PS5 nor the Xbox use AMD CPUs. Intel has a big problem.

Both PS5 and Xbox use AMD Zen 2 CPU. I guess you meant that PS5 and Xbox don't use Intel CPUs.

I highly doubt Intel wants to be in the low margin business of supplying console CPUs. Intel's fortune is entirely dependent on whether it can get back advanced process node crown from TSMC.

Re: Ask HN: How did Apple manage to create such a better chip than Intel?

#74
post #39

Earlier quoted context omitted.

Can you explain what you mean by Apple's use case vs general purpose chips?

The M1 does one thing: run MacOS and MacOS apps. They can control the vast majority of the compiled code that will be run on the chip - unlike an x86 platform where the exact same architecture is used for desktops, servers and everything in between - including Linux, windows, and Mac. Specifically there is a reference counting optimization on the M1 that dramatically helps performance of compiled Swift apps - somethi…

It also does that for, basically, one device (the three models available so far are almost identical. Fan/no fan, and some binning on the GPU)

That’s one further reason their system is faster: they designed a system, and the design of their CPU, GPU, etc. was driven by what the final system needed.

Other system manufacturers buy individual parts, where the manufacturer of each part extends/optimizes it with only a vague knowledge of what the system it will be used in will look like (and they don’t want to focus on one specific system, as that would mean they can sell it to fewer device manufacturers)

Re: Ask HN: How did Apple manage to create such a better chip than Intel?

#75
post #39

Earlier quoted context omitted.

The M1 does one thing: run MacOS and MacOS apps. They can control the vast majority of the compiled code that will be run on the chip - unlike an x86 platform where the exact same architecture is used for desktops, servers and everything in between - including Linux, windows, and Mac. Specifically there is a reference counting optimization on the M1 that dramatically helps performance of compiled Swift apps - somethi…

Could there also be hardware acceleration or built-in support for Objective-C's message-passing? I've always wondered how Apple gets decent performance with Objective-C in-spite of MP given it its complexity compared to vtables (and vtables have the advantage of being easily cachable in L1/L2).

Typical Objective-C code is mostly C (and sometimes C++). It doesn’t use message-passing in the hot loops.

Re: Ask HN: How did Apple manage to create such a better chip than Intel?

#76
post #39

Earlier quoted context omitted.

Can you explain what you mean by Apple's use case vs general purpose chips?

The M1 does one thing: run MacOS and MacOS apps. They can control the vast majority of the compiled code that will be run on the chip - unlike an x86 platform where the exact same architecture is used for desktops, servers and everything in between - including Linux, windows, and Mac. Specifically there is a reference counting optimization on the M1 that dramatically helps performance of compiled Swift apps - somethi…

> The M1 does one thing: run MacOS and MacOS apps. They can control the vast majority of the compiled code that will be run on the chip - unlike an x86 platform where the exact same architecture is used for desktops, servers and everything in between

The M1 is strongly related to their A14, which runs phones and tablets.

Also: what's between a server and a desktop machine?

Re: Ask HN: How did Apple manage to create such a better chip than Intel?

#77

It's not just the M1's design, it's what they don't have to do: no need to support anything legacy. You can't change the x86 ISA to the point where it makes a huge difference because it would no longer run x86 code. Intel can probably make faster stuff than they currently do but then their customers (PC manufacturers for instance) would have to modify all their stuff as well and they don't want to, or at least, won't…

> You can't change the x86 ISA to the point where it makes a huge difference because it would no longer run x86 code.

Couldn't they remove obsolete instructions from the ISA & then emulate removed instructions? Sure, it would be slower than having them still in the ISA, but given software using them was written for older machines, it might wash out in the end.

Re: Ask HN: How did Apple manage to create such a better chip than Intel?

#79
post #14

Earlier quoted context omitted.

>- specialization. M1 offloads oodles of compute to hardware accelerators. No idea how their code interfaces with it, but I know lots of the demos involve easy-to-accellerate tasks like codecs and neural networks that wouldn't help in benchmarks, would it? Only in the most dishonest benchmarks would they compare x264 to a hardware h.264 encoder, for instance.

Maybe - but how do you know they are off loading to a hardware encoder? Example: I run a benchmark for AES encryption - a modern CPU will have circuitry designed explicitly for this task and it's asm instructions. An old CPU just supporting the base x86 instructions probably doesn't have a hardware solution. Is it unfair to compare them? If the utilisation of the hardware accelerators is completly opaque to the user…

> I run a benchmark for AES encryption - a modern CPU will have circuitry designed explicitly for this task and it's asm instructions. An old CPU just supporting the base x86 instructions probably doesn't have a hardware solution. Is it unfair to compare them?

YES! Unless you're specifically searching for the fastest AES cpu.

If you want to compare general performance this benchmark is flawed. E.g.: I could have the fastest CPU in existence, but since it happens to be lacking hardware AES circuitry, your benchmark will always show another CPU as the 'fastest'.

It's not 'unfair' or whatever. It just makes it so that you need to think better about your benchmark, what you want to measure, and what you're actually measuring. Or you need to adjust your conclusion: "this is the fastest cpu" -> "this cpu performs best on this specific task"

Post reply on HN