Live data from Hacker News

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

news.ycombinator.com

51–60 of 87 posts

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

#51

They weren't weighed down by the legacy bloat in the x86 instruction set architecture.

Except we already had 30 years of other ISAs without that bloat, and they were all resoundingly beaten by Intel.

I think the answer is that the marginal benefits of a better ISA were less than the marginal benefits of better node process and faster iteration that Intel enjoyed. But for various reasons Intel no longer enjoys those advantages. With TSMC Apple has the process advantage, and their smartphone business has given them both the motivation and cash to iterate their architecture faster than Intel. The simpler ISA has compounded those advantages.

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

#52
post #47

This makes me wonder: If there's such a benefit from creating an integrated and specialized chip, will the next consoles follow the same approach? Will they be ARM based? If Microsoft and Sony follow this same model then PC games might be left behind with poorer graphics and fewer titles.

Consoles are already like this. The PS4, for instance, had a unified memory access between it's GPU/CPU, and custom chips silicon were basically the norm for consoles PS3 and earlier across all manufacturers. The PS5 supports custom silicon to get insane SSD streaming straight to memory to have almost instantaneous download times. In fact, older Apples, the Amiga etc. from the 80s were all powered custom silicon. Apple is taking this trope from the console world, and using it to disruptive effect in the modern PC.

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

#53
I think the M1 chip finally proves the inherent design superiority of RISC over CISC. For years, Intel stayed ahead of all other competitors by having the best process, clockspeeds, and the most advanced out-of-order execution. By internally decoding CISC to RISC, Intel could feed a large number of execution ports to extract maximum ILP. They had to spend gobs of silicon for that: complex decoding, made worse by the legacy of x86's encodings, complex branch prediction, and all that OOE takes a lot of real estate. They could do that because they were ahead of everyone else in transistor count.

But in the end all of that went bye bye when Intel lost the process edge and therefore lost the transistor count advantage. Now with the 5nm process others can field gobs of transistors and they don't have the x86 frontend millstone around their necks. So ARM64 unlocked a lot of frontend bandwidth to feed even more execution ports. And with the transistor budget so high, 8 massive cores could be put on die.

Now, people have argued for decades that the instruction density of CISC is a major advantage, because that density would make better use of I-cache and bandwidth. But it looks like decode bandwidth is the thing. That, and RISC usually requires aligned instructions, which means that branch density cannot be too high, and branch prediction data structures are simpler and more effective. (Intel still has weird slowdowns if you have too many branches in a cache line).

It seems frontend effects are real.

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

#54

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…

I respectfully disagree. Why can't Intel/AMD make new flavor of chips & motherboards explicitly saying - it doesn't support x86 ISA. Then, wouldn't we address that problem?

Apple has an advantage here because they have both an integrated hardware and software platform they can control. If only Intel did the same they'd be relying on Microsoft to provide a translation layer for their chips and that'd be unlikely unless they paid up and Microsoft dared to stray from its traditional course.

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

#55
post #53

I think the M1 chip finally proves the inherent design superiority of RISC over CISC. For years, Intel stayed ahead of all other competitors by having the best process, clockspeeds, and the most advanced out-of-order execution. By internally decoding CISC to RISC, Intel could feed a large number of execution ports to extract maximum ILP. They had to spend gobs of silicon for that: complex decoding, made worse by the…

Other things helping are forced >=16Kb page sizes, and massive L1 caches (M1 has 4X Zen 3's L1 data cache and 3X the L1 instruction cache; how much of that cache size is enabled by new process node and larger page sizes vs just lack of x86 decode I don't know).

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

#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 something quite different than the instruction the instruction as written in memory. (A decoded form.)

2) Reordering is different than pipelining, and CPUs have done both for decades. The difference between the M1 and Intel/AMD is that the M1 is wider in spots and can do much more extensive reordering. The M1 can decode and issue 8 instructions at a time. AMD can do 4 or 8 depending on whether the instruction is coming from memory or a special cache for pre-decoded instructions. The M1 has a reorder buffer of over 600 instructions—meaning it can have 600 instructions waiting for completion at a time (e.g. some executing while others are waiting for data to come back from memory). Intel and AMD’s reorder buffers are half the size.

3) Special instructions and controlling the software interface has little to do with performance on general purpose code.

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

#58

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…

The code complexity to pipeline everything to be DSP-like to avoid memory latencies is very different. And you can be sure that most developers (particularly non-console developers) aren't thinking about it. Was super impressed with how Naughty Dog was able to use 70% of the SPUs on Uncharted 2 though - which was either at launch or close to launch.

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

#59

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…

The code complexity to pipeline everything to be DSP-like to avoid memory latencies is very different. And you can be sure that most developers (particularly non-console developers) aren't thinking about it. Was super impressed with how Naughty Dog was able to use 70% of the SPUs on Uncharted 2 though - which was either at launch or close to launch.

The answer for that one is real simple, it was mostly a function of what your first target platform was.

Back in that era X360 had the edge by coming out slightly ahead schedule wise so most engines targeted that first and then had a brutal slog to cram things down to the SPUs on the subsequent PS3 port.

If you went the other way though your nicely linearized SPU friendly data code fit in-cache on the X360/PC and usually ran remarkably better.

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

#60
post #53

I think the M1 chip finally proves the inherent design superiority of RISC over CISC. For years, Intel stayed ahead of all other competitors by having the best process, clockspeeds, and the most advanced out-of-order execution. By internally decoding CISC to RISC, Intel could feed a large number of execution ports to extract maximum ILP. They had to spend gobs of silicon for that: complex decoding, made worse by the…

ARM64 can't be that easy to decode, since ARM's recent high-performance cores (A78, X1) decode ARM64 instructions into MOPS and feature a MOP cache: https://www.anandtech.com/show/15813/arm-cortex-a78-cortex-x.... And we don't know that the M1 doesn't do that. Also, even on Zen 2, the entire decode section is still a fraction of the size of say the vector units: https://forums.anandtech.com/threads/annotated-hi-res-core-d.... And the cores themselves take up a small amount of the die space on a modern CPU: https://cdn.mos.cms.futurecdn.net/m22pkncJXbqSMVisfrWcZ5-102....

A bet doing 8-wide x86 decoding would be tough, but once you've got a micro-up cache, it's doable so long as you have a cache hit. Zen 3 is 8-wide the 95% of the time you hit the micro-up cache.

The real question is how does Apple keep that thing fed? An 8-wide decoder is pointless if most of the time you've got 6 empty pipelines: https://open.hpi.de/courses/parprog2014/items/aybclrPgY4nPyY... (discussing ILP wall). M1 outperforming Zen 3 by 20% on the SPEC GCC benchmark, at 1/3 lower clocks-speed. That's 80% more ILP than an Zen 3, which is itself a large advance in ILP.

Post reply on HN