News for hackers. Stuff that matters.
Re:Memory access on the Apple M1 processor by pdpi on Wednesday January 06, 2021 @01:55PM (#25660865)
This seems to be a recurring theme with the M1, and one that, in a sense, actually baffles me even more than the alternative. There is no "magic" at play here, it's just lots and lots of raw muscle. They just seem to have a freakishly successful strategy for choosing what aspects of the processor to throw that muscle at.

Why is that strategy simultaneously remarkably efficient and remarkably high-performance? What enabled/led them to make those choices where others haven't?

Re:Memory access on the Apple M1 processor by jeffbee on Wednesday January 06, 2021 @03:10PM (#25661682)
I don't have any inside-Apple perspective, but my guess is having a tight feedback cycle between the profiles of their own software and the abilities of their own hardware has helped them greatly.

The reason I think so is when I was at Google is was 7 years between when we told Intel what could be helpful, and when they shipped hardware with the feature. Also, when AMD first shipped the EPYC "Naples" it was crippled by some key uarch weaknesses that anyone could have pointed out if they had been able to simulate realistic large programs, instead of tiny and irrelevant SPEC benchmarks. If Apple is able to simulate or measure their own key workloads and get the improvements in silicon in a year or two they have a gigantic advantage over anyone else.

Re:Memory access on the Apple M1 processor by martamorena2 on Wednesday January 06, 2021 @05:50PM (#25663790)
That's bizarre. As if CPU vendors were unable to run "realistic" workloads. If they truly aren't, that's because they are unwilling and then they are designing for failure and Apple can just eat their lunch.
Re:Memory access on the Apple M1 processor by proverbialbunny on Wednesday January 06, 2021 @06:19PM (#25664109)
As a data scientist, I feel this. Intel and AMD don't own an OS or an app store, and you might be surprised how hard it is to get good data. Data is the new gold. If a company that can corner a piece of the market, they can collect data no one else can, and from that companies are often forced to partner or they can't properly provide services that will keep them competitive.
Re:Memory access on the Apple M1 processor by epistasis on Wednesday January 06, 2021 @11:34PM (#25667307)
This makes me think that any sort of data advantage Apple may have has nothing to do with them owning an OS. Intel has a massive computer network, managed by their own IT team, just like any other large corporation. Intel could collect whatever performance data they want from actual users of actual programs just as easily as Apple could.
Re:Memory access on the Apple M1 processor by eyelidlessness on Thursday January 07, 2021 @01:47AM (#25667995)
Apple doesn’t just control an operating system or an App Store. They also control a development toolchain and the two primary languages compiled for their platforms, as well as most of the frameworks used in commonly used apps (excepting the dreaded electron). They have a platform that’s been tailored to be profiled and optimized.

One early benchmark showed allocating and destroying an NSObject performing drastically better on the M1 vs recent Intel Macs. This wasn’t an accident. It’s probably not representative of performance overall. They have enough vertical integration to make their own first party solutions clear optimization targets.

Re:Memory access on the Apple M1 processor by epistasis on Thursday January 07, 2021 @12:22PM (#25673984)
This sort of "data," that optimizing contention free locks could have big rewards, isn't something that you need to control the OS or compiler/profiler/debugger toolchain to understand and learn. And for that matter, Intel has excellent compilers and profilers too.

All it takes is looking at what's going on in commonly used code, deciding to optimize for X, Y, and Z, and commit to it. If Intel isn't doing this already, that's all the fault of current management for not making it a priority.

The only way that Apple's vertical integration helped them make that management decision is that they were able to say "our customer is a typical laptop user." Intel tries to cater to much larger markets, so perhaps when management goes to plan a laptop chip, they are less aggressive with deciding to optimize. But I have a feeling that Apple's optimizations are generally good for nearly all code, not just for specific use cases.

Re:Memory access on the Apple M1 processor by jeffbee on Thursday January 07, 2021 @12:37PM (#25674270)
There's really no explanation for why EPYC "Naples" was so bad other than AMD did not internally understand the performance of realistic large-scale programs. I mean even if they had taken anything off the shelf, for free, like MySQL, they could have determined at some point before mass production that their CPU, in fact, sucked. But they shipped it and prospective customers rejected it.

Don't discount how a weak organization can make poor decisions even when all necessary information seems to be readily available.

Re:Memory access on the Apple M1 processor by philistine on Thursday January 07, 2021 @12:34AM (#25667614)
Apple is the only large company with a functional organization. Could that be it ? Coupled with their unparalleled ownership of a family of platforms (intel’s OS comparably is nonexistent).
Re:Memory access on the Apple M1 processor by epistasis on Thursday January 07, 2021 @12:24PM (#25674029)
I think you're probably right, but it's funny because I think Intel was well known for having really exceptional organizational function in the past. They used to be paranoid about everything!
Re:Memory access on the Apple M1 processor by ohazi on Friday January 08, 2021 @05:51AM (#25683427)
> Intel and AMD don't own an OS or an app store

They could run their benchmarks on the Debian repository and it would probably be representative enough.

If they haven't done so, perhaps because it seemed tedious or unimportant, well, that mistake would be on them.

Re:Memory access on the Apple M1 processor by pabs3 on Wednesday January 06, 2021 @11:04PM (#25667167)
Intel do own an OS, Clear Linux, but they probably lack profiles of typical usage of that OS, and probably there are not many users of it apart from Phoronix when they do benchmarking.

https://clearlinux.org/

Re:Memory access on the Apple M1 processor by kortilla on Wednesday January 06, 2021 @09:45PM (#25666658)
It’s a big world out there. Workloads in data science vs gaming vs hft vs packet processing vs web servers are all extremely different.

Even if you know about them, you need an expert in each to truly push the hardware to the real limits that get hit in the respective industry. The small differences between real implementations and simulated loads can drastically alter the performance characteristics and cause proc manufacturers to miss the mark.

Re:Memory access on the Apple M1 processor by bradknowles on Saturday January 09, 2021 @10:27PM (#25709168)
There’s another factor here, that I learned when I did a six month contract at Apple Retail Software Engineering.

In short, Apple has a number of 10x engineers that they move around to whatever project needs the most help, whether that is hardware, or application software, or operating system software, or services infrastructure, or whatever.

If some project starts getting enough negative “above the fold” coverage, then they will be temporarily gifted one or more of these special engineers.

Do that enough times, and those 10x engineers will gain enough experience in enough different areas that they will be able to reason well about the other end of whatever pipeline they’re on, and will know other 10x engineers that they can work with on that other end of the pipeline, because they had previously worked with them on some other project in the past months or years.

And those 10x engineers really will make a huge difference in what that project is capable of delivering.

The key failure of this operating mode is that most of the 10x engineers never get enough time to transfer much knowledge or skills to the others on the temporary team they are currently working with, and so things will start slowly deteriorating when they are necessarily moved on to the next project.

Rinse and repeat.

Re:Memory access on the Apple M1 processor by gumby on Thursday January 07, 2021 @01:28PM (#25675114)
> I don't have any inside-Apple perspective, but my guess is having a tight feedback cycle between the profiles of their own software and the abilities of their own hardware has helped them greatly.

Also we see not the first chip but the first one that met their needs (demonstrably better performance on their workloads).

By which I mean: presumably MacOS has been running a many generations of A processors, so they have had a lot of time to figure out what tweaks would be good and which turn out to be pessimization and overkill. It doesn't hurt that there is significant internal overlap between modern macOS and iOS.

Re:Memory access on the Apple M1 processor by dcolkitt on Wednesday January 06, 2021 @04:41PM (#25662962)
Interesting point. This would suggest pretty sizable synergies from the oft-rumored Microsoft acquisition of Intel.
Re:Memory access on the Apple M1 processor by ChuckNorris89 on Wednesday January 06, 2021 @05:41PM (#25663680)
Microsoft doesn't need to acquire Intel, they need to do what Apple did and acquire a stellar ARM design house that will build a chip with x86 translation, tailored to accelerate the typical workloads on Windows machines and sell those chips to the likes of Dell and Lenovo and tell developers "ARM Windows is the future, x86 Windows will be sunset in 5 years and no longer supported by us, start porting your apps ASAP and in the mean time, try our X86 emulator on our ARM silicon, it works great."

Microsoft proved with the XBOX and Surface series they can make good hardware if they want, now they need to move to chip design.

Re:Memory access on the Apple M1 processor by sitkack on Thursday January 07, 2021 @12:07AM (#25667489)
Microsoft has a pretty good relationship with AMD from the Xbox. AMD already made an Arm Opteron. Windows has been multiplatform since NT 3.1 (Alpha, MIPS) and then in 3.51 adding in PowerPC. You can download Windows for Arm for free and run in on a Raspberry Pi.

Microsoft has at least one homegrown processor that it has ported Windows and Linux to with the confusingly named 'Edge'.

https://www.theregister.com/2018/06/18/microsoft_e2_edge_win...

Microsoft doesn't even _need_ to target Arm, they could easily team up with AMD or go the whole thing solo and target anything from RISC-V, Arm to an in-house ISA.

Re:Memory access on the Apple M1 processor by mietek on Thursday January 07, 2021 @05:17AM (#25669377)
> Windows has been multiplatform since NT 3.1 (Alpha, MIPS) and then in 3.51 adding in PowerPC.

What was the last version of Windows to support either of these platforms?

Re:Memory access on the Apple M1 processor by jeffbee on Thursday January 07, 2021 @10:01AM (#25671809)
PowerPC was the last architecture standing. It was supported by NT 4.0 SP2 (technically this means Microsoft supported it on paid support contracts as recently as 2006).
Re:Memory access on the Apple M1 processor by gsnedders on Thursday January 07, 2021 @11:11AM (#25672686)
Windows Server 2008 R2 supported Itanium.
Re:Memory access on the Apple M1 processor by sroussey on Thursday January 07, 2021 @01:07AM (#25667781)
There are rumors of Ryzen CPUs with ARM ISA, but I think AMD has enough on its plate.
Re:Memory access on the Apple M1 processor by ralfd on Wednesday January 06, 2021 @05:56PM (#25663852)
Apple has at most 10% of the computer market and is just one player among many. I am skeptical Microsoft with their 90% dominance would or should be allowed this much power over the industry.
Re:Memory access on the Apple M1 processor by sjwright on Wednesday January 06, 2021 @10:09PM (#25666801)
The traditional personal computer market isn't nearly as important as it used to be. However you slice the pie, there's no way you can define the pieces to be 10% Apple and 90% Microsoft with a straight face.
Re:Memory access on the Apple M1 processor by mechEpleb on Thursday January 07, 2021 @06:21AM (#25669780)
90% dominance of what is increasingly a small niche market. Apple controls a large fraction of the mobile device market, and everything else runs linux.
Re:Memory access on the Apple M1 processor by icedchai on Thursday January 07, 2021 @05:43PM (#25678705)
The fact is outside of the tech scene, most businesses and consumers runs Windows. To say this is a "small niche market" is laughable. Microsoft is everywhere.
Re:Memory access on the Apple M1 processor by bradknowles on Saturday January 09, 2021 @10:34PM (#25709296)
Compare how many millions of desktop PCs there are in the world, versus the billions of mobile devices.
Re:Memory access on the Apple M1 processor by eyelidlessness on Thursday January 07, 2021 @01:50AM (#25668007)
From what I understand, Microsoft is excellent at hardware design. They’re just focused on a different market (services->business rather than consumers->services)
Re:Memory access on the Apple M1 processor by f6v on Wednesday January 06, 2021 @05:28PM (#25663517)
> Microsoft acquisition of Intel

Could that possibly be approved by governments?

Re:Memory access on the Apple M1 processor by gigatexal on Wednesday January 06, 2021 @05:44PM (#25663703)
Nope. Not a lawyer but I doubt it at all.
Re:Memory access on the Apple M1 processor by TYPE_FASTER on Wednesday January 06, 2021 @02:33PM (#25661275)
Apple has been iterating on their proprietary mobile ARM-based processors since 2010, and has gotten really good at it. I would imagine that producing billions of consumer devices with these chips has helped give them a lot of experience in shortened time frame.

I also wonder if having the hardware and software both worked on in-house is an advantage. I mean, if you're developing power management software for a mobile OS, and you're using a 3rd-party vendor, then you read the documentation, and work with the vendor if you have questions. If it's all internal, you call them, and could make suggestions on future processor design too based on OS usage statistics and metrics.

Re:Memory access on the Apple M1 processor by simonh on Thursday January 07, 2021 @10:36AM (#25672166)
In fact there is clear evidence of this with M1. It has optimised instructions to speed up retain/release of NSObject subclasses, which is a frequent operation on almost all Objective-C and Swift classes. They also designed the M1 to support a memory management profile used by x86 (and not ARM) to accelerate Rosetta translated binaries. I'm sure there are more.
Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @03:46PM (#25662237)
>Why is that strategy simultaneously remarkably efficient and remarkably high-performance? What enabled/led them to make those choices where others haven't?

The things people give them complains about:

(a) keeping a walled garden,

(b) moving fast and taking the platform to new directions all at once

(c) controlling the whole stack

Which means they're not beholden to compatibility with third party frameworks and big players, or with their own past, and thus can rely on their APIs, third party devs etc, to cater to their changes to the architecture.

And they're not chained to the whims of the CPU vendor (as the OS vendor) or the OS vendor (as the CPU vendor) either, as they serve the role of both.

And of course they benchmarked and profiled the hell out of actual systems.

Re:Memory access on the Apple M1 processor by jeffbee on Wednesday January 06, 2021 @05:06PM (#25663281)
Neither A nor C makes any sense, are not supported by evidence. There is no aspect of the mac or macOS that can be realistically described as a "walled garden". It comes with a compiler toolchain and ... well, some docs. It natively runs software compiled for a foreign architecture. You can do whatever you want with it. It's pretty open.

A "walled garden" is when there is a single source of software.

Re:Memory access on the Apple M1 processor by matthew-wegner on Wednesday January 06, 2021 @08:14PM (#25665868)
"A" does matter a bit. Builds are uploaded to the App Store include bitcode, which Apple strips on distribution.

According to docs, enabling bitcode: "Includes bitcode which allows the App Store to compile your app optimized for the target devices and operating system versions, and may recompile it later to take advantage of specific hardware, software, or compiler changes."

It seems quite likely they have (and probably used) the capability to recompile any app on their platform to benchmark real workloads against prototype silicon changes.

Re:Memory access on the Apple M1 processor by mamp on Wednesday January 06, 2021 @09:23PM (#25666508)
Most non-Apple apps aren’t from the App Store
Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @10:53PM (#25667098)
Doesn't matter for the purposes of what the parent mentioned.

It's enough that enough of them are.

Plus, even if most aren't, the "short tail" people use these days probably are.

Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @06:20PM (#25664128)
Walled garden has many meanings, depending on context.

macOS promotes the App Store as the source of software (even if it's not the sole), and has walls like notarization requirements and the Gatekeeper to prevent weeds from intruding.

With the App Store Apple knew that there's a pool of N apps that follows its guidelines, has passed internal checks for API use, and can be converted quite easily to a different architecture, that it could count on.

Their control over the platform allowed them to enforce Metal and deprecate OpenGL pronto, to add a new combined iOS/macOS UI libs, to introduce Marzipan.

They have also added stuff like Universal Binary support, and most importantly Bitcode, which abstracts away parts of the underlying architecture.

All of those where steps towards the ARM/M1 (and future developments), and all were enabled via Apple's control of the hardward, software, and - sure, partial - control of third party apps.

Re:Memory access on the Apple M1 processor by ogre_codes on Wednesday January 06, 2021 @06:17PM (#25664089)
People seem to get creative about terminology. It's not remotely like what I'd consider a walled garden (xBox, iOS, Playstation, etc).
Re:Memory access on the Apple M1 processor by paulryanrogers on Wednesday January 06, 2021 @06:38PM (#25664369)
Running apps downloaded outside the store requires jumping through an increasing number of hoops or vendors pay to get every build signed off by a single party.
Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @07:12PM (#25664827)
You don't have to pay to have your apps signed off (notarized).
Re:Memory access on the Apple M1 processor by paulryanrogers on Wednesday January 06, 2021 @07:25PM (#25665062)
I'll have to check again because if that's the case it's still a walled garden, just with free admission.
Re:Memory access on the Apple M1 processor by astrange on Wednesday January 06, 2021 @09:17PM (#25666446)
Just right-click > Open and you can do anything you want.
Re:Memory access on the Apple M1 processor by perryizgr8 on Thursday January 07, 2021 @03:26AM (#25668644)
Which is a short wall you just jumped. To get into the walled garden.
Re:Memory access on the Apple M1 processor by fartcannon on Wednesday January 06, 2021 @03:55PM (#25662363)
They could still do all this shit without the walled garden. To me, it suggests they aren't willing to compete. They're anti-competitive.
Re:Memory access on the Apple M1 processor by ogre_codes on Wednesday January 06, 2021 @06:22PM (#25664150)
> They could still do all this shit without the walled garden.

They do. MacOS isn't a walled garden.

> They're anti-competitive

Have you heard of this little company from Washington called Microsoft? They have something like 85% of the PC market. There is another OS called Linux. About 85-90% of the internet runs on it.

I can understand a little where people get the idea the iPhone is anti-competitive, but we're talking about MacOS here.

Re:Memory access on the Apple M1 processor by fartcannon on Wednesday January 06, 2021 @09:49PM (#25666686)
It's the same cowardly leadership that stewards both iOS and OSX.

Ask Amphetamine about how open they are.

Re:Memory access on the Apple M1 processor by ogre_codes on Wednesday January 06, 2021 @10:36PM (#25666991)
I do wish people would keep the quasi-religious aspects out of things.

Amphetamine is a perfect example of how the Mac isn't a walled garden. They always had the option top sell outside the App Store. That is fundamentally the difference between what makes a platform a walled garden. They might have lost some sales because they couldn't participate in the Mac App Store, but they could still sell their product. Some companies choose to avoid the Mac App Store because they don't like Apple's policies.

Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @11:01PM (#25667144)
>Ask Amphetamine about how open they are.

That's neither here nor there.

(a) Amphetamine could still be sold outside the Mac App Store.

(b) An app name could be problematic even in FOSS land. It's just that instead of Amphetamine being the name that causes it, it will be something else. E.g. with the trend of banning/changing terms like "master" (as in replication primary master, not as in the owner of slaves), unfortunately named apps could be thrown out something or ask to be renamed to be included in a distros package manager or a project.

Re:Memory access on the Apple M1 processor by astrange on Thursday January 07, 2021 @12:16AM (#25667533)
There are a lot of juvenile named open source projects that will definitely get in trouble or already have. GIMP and LAME are examples.
Re:Memory access on the Apple M1 processor by marrvelous on Wednesday January 06, 2021 @04:28PM (#25662764)
With the walled garden, Apple can set enforceable timelines for the software ecosystem to adopt to architectural changes.

Remember the transition to arm64? Apple forced everything on the App Store to ship universal binaries.

Without the App Store walled garden, software isn’t required to keep up to date with architectural changes. Instead, keeping current is only a requirement to being featured on the App Store (which would just be a single way to install software, not the only method).

Re:Memory access on the Apple M1 processor by danaris on Wednesday January 06, 2021 @04:47PM (#25663031)
Well, and on the Mac, it's not the only method. The walled garden here has big open gates.

That said, all software on the Mac, post-Catalina, has to be 64-bit, whether it's distributed through the Mac App Store or not, because the 32-bit system libraries are no longer included at all.

Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @06:25PM (#25664204)
>Well, and on the Mac, it's not the only method. The walled garden here has big open gates.

Gates are not incompatible with walled gardens. Most walled gardens have those.

Plus, I mentioned the walled garden as a good thing. It's part of the Apple proposition (even if not alll get it), and part of what it enables it to move at the speed it does (whether in the right or wrong direction).

But one can susbstitute "walled garden" with "tight control of the OS, hardware and imposed requirements on most of third party software, and willingness to enforce hard schedules (e.g. regarding removing 32-bit, OpenGL, etc) to all (or tons) of its developers at once.

Re:Memory access on the Apple M1 processor by astrange on Wednesday January 06, 2021 @09:18PM (#25666460)
32-bit Windows software is actually supported through WINE and works in Rosetta.
Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @11:01PM (#25667149)
This is about 32-bit OS X software/libs.
Re:Memory access on the Apple M1 processor by ogre_codes on Wednesday January 06, 2021 @06:29PM (#25664254)
They are little tiny 6" tall walls that you can step over. Like micro-walls. Except for the bits where you have no walls at all. Like if you install literally any programming language, HomeBrew, or MacPorts.

The walls in the walled garden only exist in the heads of people who never use a Mac.

Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @06:22PM (#25664149)
>They could still do all this shit without the walled garden

With much slower adoption, pushback, and bike-shedding, like in the Microsoft and Linux world.

>To me, it suggests they aren't willing to compete.

Compete with what? With themselves? They compete with Windows (and to a degree Linux, though few care for that), and with Android. They'd compete with Windows Phone too if MS wasn't incompetent.

But they didn't do anything to preclude others from making their OS/hardware and selling it to customers. In fact, they have nowhere near a monopoly in either the desktop (10% or less) or the mobile space (40% or less).

Whereas MS for example, had 98% of the desktop (home and enterprise), and abused its power to threaten OEMs to do its bidding against Linux etc.

Re:Memory access on the Apple M1 processor by anfilt on Wednesday January 06, 2021 @04:54PM (#25663118)
I will be honest as long apple keeps this walled garden shenanigans going. I am not buying any of their hardware.
Re:Memory access on the Apple M1 processor by anfilt on Wednesday January 06, 2021 @06:26PM (#25664212)
What's with downvotes? I know some people don't mind, but it's a deal breaker to me, and it something I don't want to support.

I don't care how good their hardware is. Moreover, good luck sourcing parts if the device has trouble. Apple will not sell you the parts. Even if you wanted.

A walled garden does not make their hardware any better. If anything it makes it worse. I hope for Mac users apply does not clamp down further on Macs.

Re:Memory access on the Apple M1 processor by coldtea on Wednesday January 06, 2021 @06:41PM (#25664408)
>What's with downvotes?

Didn't downvote, but I think it's the same as when people read a "letter to the editor" of yore, declaring that some person "cancelled their subscription" because of something in the magazine.

A natural response is "Don't let the door hit you on your way out", which on HN might be expressed through a downvote by some.

>I don't care how good their hardware is. Moreover, good luck sourcing parts if the device has trouble. Apple will not sell you the parts. Even if you wanted.

Well, they repair all kinds of parts, and have guarantees and guarantee extension programs. But in any case, their allure was never "can find parts to build my own / repair damages forever" or in their stuff being cheap to own or fix/replace.

>A walled garden does not make their hardware any better.

Well, it does in a few ways. Mandating how the software is made, and what software is sold, when it should adapt new libs to continue being sold, etc, means that they can move the platform in different ways faster.

Re:Memory access on the Apple M1 processor by anfilt on Thursday January 07, 2021 @03:03AM (#25668505)
> "Don't let the door hit you on your way out"

I never bother to enter apple's tyrannical ecosystem . So there is no door to hit me on the way out.

> Well, they repair all kinds of parts, and have guarantees and guarantee extension programs.

You can not get a lot surface mount chips to repair a mac book or iPhone without having to look on the gray-market. This is even before possible firmware issue if you manage to find parts. Heck even getting full replacement boards is basically impossible, unless they are from donor machines that have other problems.

> "Well, it does in a few ways. Mandating how the software is made, and what software is sold, when it should adapt new libs to continue being sold, etc, means that they can move the platform in different ways faster."

I disagree, allowing people to side-load does not stop apple from having policies in place for it's app stores. That's honestly the only problem. It's the owners hardware, they should not need apples permission to run code on it. Unless the owner can sign software themselves and/or run it without apple's consent this will always be a problem. You can't even install gcc without jailbreaking an iPhone.

At the very least I should be able to install an other OS on the device like GNU/Linux. If apple does not want to open iOS the user should at least have that option for the hardware.

This is even before you get into how apple treats developers. Have you read the entire App store guidelines. Some of it is ridiculous. Some of the insanity prevents Firefox from even porting their own browser engine.

Re:Memory access on the Apple M1 processor by mhh__ on Wednesday January 06, 2021 @02:25PM (#25661187)
I think it's worth saying that because AMD have only just really hit their stride, Intel were under almost zero pressure to improve which has really hurt them especially with the process.

X86 is definitely a coefficient overhead, but if Intel put their designs on 5nm they'd look pretty good too - Jim Keller (when he was still there) hinted their offerings for a year or so in the future are significantly bigger to the point of him judging it to be worth mentioning so I wouldn't write them off.

Re:Memory access on the Apple M1 processor by jandrese on Wednesday January 06, 2021 @04:31PM (#25662814)
It seems like Apple listened when people talked about how all modern processors bottleneck on memory access and decided to focus heavily on getting those numbers better.

Of course this leads to the question that if everyone in the industry knew this was the issue why weren't Intel and AMD pushing harder on it? They already both moved the memory controller onboard so they had the opportunity to aggressively optimize it like Apple has done, but instead we have year after year where the memory lags behind the processor in speed improvements, to the point where it is ridiculous how many clock cycles a main memory access takes on a modern x86 chip.

Re:Memory access on the Apple M1 processor by wmf on Thursday January 07, 2021 @12:40AM (#25667649)
The Apple, Intel, and AMD memory controllers all look pretty similar in performance to me. Memory latency is the same at ~100 ns; Firestorm is clocked lower so latency is lower in terms of cycles. One Firestorm core can saturate the memory controller while Intel/AMD can't so that should be an advantage for single-threaded scenarios. Intel/AMD are behind, but I wouldn't say embarrassingly so and they haven't been lazy.
Re:Memory access on the Apple M1 processor by proverbialbunny on Wednesday January 06, 2021 @06:15PM (#25664058)
My guess is it had to do with limitations tied to the x86_64 instruction set. It doesn't matter how much modifications you do, if you don't start with a good foundation, you're going to be limited to that foundation.
Re:Memory access on the Apple M1 processor by nkurz on Wednesday January 06, 2021 @07:57PM (#25665666)
I think the current consensus among experts is that the instruction set is not the limiting factor. Modern x64 microprocessors have a separate front-end that handles instruction decoding. These instructions are decoded to internal proprietary "micro-ops". The internal buffers and actual execution units see only these µops. One can measure where the bottlenecks are, and it's rare to find that the front-end is the bottleneck. While it's arguably true that x64 is a poorly designed "foundation", it's unlikely to be causing any performance difference here.
Re:Memory access on the Apple M1 processor by wtallis on Wednesday January 06, 2021 @08:42PM (#25666150)
> One can measure where the bottlenecks are, and it's rare to find that the front-end is the bottleneck.

Part of this is due to the fact that x86 processor designers won't include more execution units than they can feed from their instruction decoders. Apple's processors are much wider than x86 on both the decode and execution resources, and it's pretty clear that the M1 would not perform as well if its decoders were as narrow as current x86 cores.

Re:Memory access on the Apple M1 processor by nkurz on Wednesday January 06, 2021 @09:30PM (#25666559)
> it's pretty clear that the M1 would not perform as well if its decoders were as narrow as current x86 cores

This would imply that it's able to sustain ILP greater than 4 (or maybe 5 with macro-fusion). Does it actually manage to do this often? If so, that's really impressive. I was guessing that most of the advantage was coming from the improved memory handling, and possibly a much bigger reorder buffer to better take advantage of this, but I'm happy to be shown otherwise.

Re:Memory access on the Apple M1 processor by astrange on Wednesday January 06, 2021 @09:14PM (#25666427)
There are real differences in processors caused by their ISAs - it's not true that decoders mean it's all the same RISC in the backend.

For instance, it's hard to combine instructions together, which is actually an advantage for x86 (the complex memory operands come for free). But it also guarantees memory ordering that ARM doesn't which is a drawback.

I'm not sure how important this is in practice.

Re:Memory access on the Apple M1 processor by nkurz on Wednesday January 06, 2021 @09:27PM (#25666540)
> For instance, it's hard to combine instructions together, which is actually an advantage for x86 (the complex memory operands come for free).

True, although I just looked at the ARM assembly for Daniel's example, and it's making good use of "ldpsw" to load two registers from consecutive memory with a single instruction. So in this particular case, it may be a wash.

> But it also guarantees memory ordering that ARM doesn't which is a drawback.

Yes, I wasn't considering the memory model to be part of the instruction set. I agree that in general this could be a big difference in performance, although I don't think it comes up in Daniel's example.

I added a comment to Daniel's blog with my guess as to what's happening to cause the observed timings in his example. Feedback from anyone with better knowledge of M1 would be appreciated.

Re:Memory access on the Apple M1 processor by rstuart4133 on Thursday January 07, 2021 @06:31PM (#25679152)
> I think the current consensus among experts is that the instruction set is not the limiting factor.

Yes and no. Yes, because modern super scalar CPU's don't execute the instructions directly, but rather use a different instruction set entirely (the "micro-ops") and effectively compile the native instructions into that. This makes them free to choose whatever micro-ops they want. Ergo the original instructions don't matter.

But .... that means there is a compile step now. For a while that was no biggie - it can pipelined if the encoding is complex. But now the M1 has 12 (iirc) execution units. In the worst case that means they can execute 12 instructions simultaneously, so they must decode 12 instructions simultaneously. The is a wee exaggeration as it isn't that bad. In reality the M1 appears to compile 8 instructions in parallel.

This is where the rot sets in for x86. Every ARM64 instruction is 32 bits wide. So the M1 grabs 8 32 bit words, compilers them in parallel to micro-ops. Next cycle, grab another 8 32 words, compile them to micro-ops, and so on. But the x86 instructions can start on any byte boundary, and can be 1 to 16 bytes in length. You literally have to parse the instruction stream a byte at time before you can start decode it. In practice they cheat a bit, making speculative guesses about where instructions might start and end, but when you're being compared to someone who effortlessly processes 32 bytes at a time that's like pissing in the wind.

So the instruction set may not matter, but how you encode that instruction set does matter, at lot. Back in the day, when there we few caches and every instruction fetch cost memory accesses, you were better off using tricks like using one byte for the most common instructions to squeeze the size of instruction stream down. That is the era x86 and amd64 hark from. (Notably, the ill-fated Intel iAPX 32 took it to an extreme, having instructions start and end on a bit boundary.) But now with execution units operating in parallel, and on chip caches putting instruction stores on chip right beside the CPU's, you are better off making storage size worse in order to gain parallelism in decoding. That's where ARM64 harks from.

It's interesting watch RISC-V grapple with this. It's a very clever instruction set encoding that scales naturally between different word sizes. This also naturally leads to a very tight, compressed instruction set. But in order to achieve that they've got more coupling between instructions than ARM64 (but far, far less than x86), and any coupling makes parallelism harder. Currently RISC-V designs are all at the small, non-parallel end, so it doesn't effect them at all. In fact at the low power end it's almost certainly a win for them. But I get the distinct impression the consensus of opinion here on HN is it will prevent them from hitting the heights ARM64 and the M1 achieve.

Re:Memory access on the Apple M1 processor by nkurz on Thursday January 07, 2021 @08:44PM (#25680352)
Great comment, and great accurate explanations of complex stuff! I'm still going to disagree with the conclusion, though. Yes, x64 has to jump over horrible hurdles to prevent instruction decode from being a bottleneck. Yes, this makes for more complex processors, possibly with poorer performance per Watt. But I'm asserting (in my reasonably expert opinion) that the ridiculous contortions currently in use are (in almost all cases) adequate to prevent the instruction decoder from being the bottleneck.

What's missing from your description is the extra level of decoded µop cache between the decoder and instruction queue on modern Intel chips. In a tight loop, this pre-decoder kicks in and replays the previously decoded µops at up to 6 per cycle. It's a mess (and complicated enough that Intel needed to disable part of it with a microcode update on Skylake) but it provides enough instruction throughput that the real bottleneck is almost always elsewhere. Specifically, the 4-per-cycle instruction retirement limit almost always maxes out my attempts at extremely tight loop code earlier than instruction decoding.

Which is to say, you are right about how much easier it is to decode ARM64 instructions, but I think you are wrong that decoding x64 is in-practice a limiting factor for performance. If you have a non-contrived example to the contrary, I'd love to see it.

More details here: https://en.wikichip.org/wiki/intel/microarchitectures/skylak...

And in this nice blog post: https://paweldziepak.dev/2019/06/21/avoiding-icache-misses/

Re:Memory access on the Apple M1 processor by fctorial on Wednesday January 06, 2021 @11:37PM (#25667327)
> but instead we have year after year where the memory lags behind the processor in speed improvements

That's what cache and tlb are for.

Re:Memory access on the Apple M1 processor by sitkack on Thursday January 07, 2021 @12:10AM (#25667496)
Because they both use new memory standards to force a refresh in their CPU platforms to cause more churn and revenue.
Re:Memory access on the Apple M1 processor by adam_arthur on Wednesday January 06, 2021 @04:06PM (#25662492)
Certainly Apple's processors are far ahead, but they're a full process generation (5nm) ahead of their competitors. They paid their way to that exclusive right through TSMC.

I'm sure they'll still come out ahead in benchmarks, but the numbers will be much closer once AMD moves to 5nm. You absolutely cannot fairly compare chips from different fab generations.

I don't see many comments hammering this point home enough... it's not like the performance gap is through engineering efforts that are leagues ahead. Certainly some can be attributed to that, and Apple has the resources to poach any talent necessary.

Re:Memory access on the Apple M1 processor by GeekyBear on Wednesday January 06, 2021 @05:47PM (#25663748)
A node shrink gives you a choice of cutting power, improving performance, or some mix of the two.

Apple appears to have taken the power reduction when they moved to TSMC 5nm.

>The one explanation and theory I have is that Apple might have finally pulled back on their excessive peak power draw at the maximum performance states of the CPUs and GPUs, and thus peak performance wouldn’t have seen such a large jump this generation, but favour more sustainable thermal figures.

Apple’s A12 and A13 chips were large performance upgrades both on the side of the CPU and GPU, however one criticism I had made of the company’s designs is that they both increased the power draw beyond what was usually sustainable in a mobile thermal envelope. This meant that while the designs had amazing peak performance figures, the chips were unable to sustain them for prolonged periods beyond 2-3 minutes. Keeping that in mind, the devices throttled to performance levels that were still ahead of the competition, leaving Apple in a leadership position in terms of efficiency.

https://www.anandtech.com/show/16088/apple-announces-5nm-a14...

Re:Memory access on the Apple M1 processor by justsid on Wednesday January 06, 2021 @08:27PM (#25666001)
That seems like a pretty good trade off for mobile devices. They usually don’t have sustained performance needs, you aren’t going to render a movie or do other long running computational tasks. But mobile has a lot of bursty power demands: Launch dozens of app many times a day for example. You want your short-ish interactions with your phone to be snappy.
Re:Memory access on the Apple M1 processor by wmf on Wednesday January 06, 2021 @04:08PM (#25662521)
From a customer's perspective it's not my problem. Everyone had the opportunity to bid on that fab capacity and they decided not to.
Re:Memory access on the Apple M1 processor by adam_arthur on Wednesday January 06, 2021 @04:20PM (#25662657)
Yeah, totally agreed. But if you read these comments, they seem to be in total amazement about the performance gap and not acknowledging how much of an advantage being a fab generation ahead is.

Customers don't care, but discussion of the merits of the chip should be more nuanced about this.

It also implies that the gap won't exist for very long, as AMD will move onto 5nm soon

Re:Memory access on the Apple M1 processor by tandr on Wednesday January 06, 2021 @05:20PM (#25663428)
> It also implies that the gap won't exist for very long, as AMD will move onto 5nm soon

... yes, if there is any capacity left. Capacity for the new process is a limited resource after all.

Re:Memory access on the Apple M1 processor by jack_pp on Wednesday January 06, 2021 @11:37PM (#25667324)
People keep pointing this out but has Intel had such significant performance improvements since sandy bridge? With x86 it seems that lately you would be foolish to upgrade less than once every 3-4 years because the difference is just not that significant
Re:Memory access on the Apple M1 processor by adam_arthur on Thursday January 07, 2021 @02:33PM (#25676066)
The i7-2600K (Sandy Bridge) benchmarks at ~5000 on Passmark, and the i7-10700K at about 20,000. So it seems they've had quite a bit of improvement. Note this is going from 32nm to 14nm.

Intel is in a really bad place now (in a forward-looking sense), primarily due to their fab process falling behind TSMC and others. You can't design your way ahead while using old manufacturing technology

https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i7-2600K...

Re:Memory access on the Apple M1 processor by wmf on Thursday January 07, 2021 @12:28AM (#25667590)
Over the last decade or so Apple has gone from 10x slower than Intel to parity, mostly by implementing techniques that were already known. Surpassing the state of the art may be harder to do consistently.
Re:Memory access on the Apple M1 processor by valuearb on Wednesday January 06, 2021 @06:36PM (#25664335)
A node shrink is going to help AMD by 15% at best, they are much farther behind than that on performance per watt.

AMD has done mobile CPUs that look as if they are close to or even ahead of the M1 in performance, but they all use 2x to 4x as much power. When higher core count versions of Apple Silicon are available, they will be able to have double the core counts of AMD chips at the same power levels.

And each those cores are significantly faster than individual AMD cores.

Re:Memory access on the Apple M1 processor by GeekyBear on Wednesday January 06, 2021 @07:08PM (#25664758)
AMD's mobile chips are still on Zen 2 cores, so they are behind the M1 on single core performance in both integer and floating point.

It's their desktop chips running Zen 3 cores that trade blows on single core integer math, depending on which benchmark you look at.

https://www.anandtech.com/show/16252/mac-mini-apple-m1-teste...

Of course, on multi-core performance you can buy a desktop chip with a much higher Zen 3 core count than Apple offers.

Re:Memory access on the Apple M1 processor by valuearb on Wednesday January 06, 2021 @07:42PM (#25665432)
The Ryzen 5950x has 135 watt TDP in actual use. That’s roughly 8x the M1.

https://www.anandtech.com/show/16214/amd-zen-3-ryzen-deep-di...

And Ryzen chips are offered with more cores, but that’s an extremely temporary advantage (reminds me of the friend who told me not to buy Apple stock because they didn’t have big screen phones).

When Apple fits 32 Firestorm cores in a 135 watt TDP package, AMD isn’t going to have an answer.

Re:Memory access on the Apple M1 processor by adam_arthur on Wednesday January 06, 2021 @10:50PM (#25667082)
Power consumption is not linear as it relates to performance. CPUs designed for the desktop are going to use excessive power by design. They'll often use many times more power than mobile equivalent, but only have slightly better single core performance.

Here's a great example, Intel Core i9 (Desktop, 125w TDP) vs Intel Core i7 (Laptop, 15W). Huge power difference, only ~10% difference in single core clock speeds. https://cpu.userbenchmark.com/Compare/Intel-Core-i9-10900K-v...

Re:Memory access on the Apple M1 processor by valuearb on Friday January 08, 2021 @05:23PM (#25691313)
It might not be linear in terms of single core performance, where Apple already dominates, but it sure has a nearly linear relationship to multicore performance.
Re:Memory access on the Apple M1 processor by adam_arthur on Friday January 08, 2021 @05:46PM (#25691525)
Ok, but their multicore score is only on par, not better than equivalent class chips on older fab generations. Where is the huge gap?

https://wccftech.com/intel-and-amd-x86-mobility-cpus-destroy...

Or check multicore scores here: https://browser.geekbench.com/mac-benchmarks

m1 is better by 20% or so, but is 2 fab generations ahead of the intel chips

Re:Memory access on the Apple M1 processor by valuearb on Saturday January 09, 2021 @09:50PM (#25708547)
The M1 only has 4 Firestorm cores and 15 watts TDP. It’s other four cores are Icestorm cores offering roughly 1/10th the performance and 1/3rd the power draw.

https://www.anandtech.com/show/16192/the-iphone-12-review/2

The Ryzen 4900H is a 55 watt TDP part with eight performance cores. Despite that it’s far behind the M1 in GeekBench single core and multicore scores.

https://browser.geekbench.com/v5/cpu/search?q=4900H

Now as you shown it’s way ahead in Cinebench 23 Multicore benchmark. Let’s assume that’s more representative of real world use, and that being a process behind it will add 15% higher performance when AMD makes a 5 nm successor. That would increase its Cinebench Multicore to roughly 12,700, roughly 60% higher than the M1.

But all Apple has to do is come out with an M1X with eight Firestorm cores. That’s a multicore performance in the same range as the best possible 5 nm AMD CPU, and a TDP barely half of the AMD CPU. And far higher Cinebench single core, and GeekBench single/multicore ratings.

Obviously to swap Firestorm for IceStorm cores they need more transistors or something else has to go (on chip GPU?).

And Apple won’t be making 20 hour MacBook Airs out of this M1X, but they will be able to make 14 hour MacBook Pros with faster discrete GPUs.

And they are about 6 months from doing exactly that. Which is likely going to before AMD 5 nm, so top of line 4900H laptops get smoked on all Cinebench and GeekBench scores while using nearly double the power.

Re:Memory access on the Apple M1 processor by fomine3 on Wednesday January 06, 2021 @07:45PM (#25665490)
Apple M1 is fully optimized for efficiency because it's delivered from mobile SoC and still aimed for portable laptop, meanwhile Zen3 (or Willow Cove) arch is aimed for all laptop/desktop/server category so they optimized for both efficiency and max performance.

Even though M1 is designed for efficiency, it sometimes outperforms AMD/Intel for performance. That confuses the story.

Re:Memory access on the Apple M1 processor by inkyoto on Wednesday January 06, 2021 @09:26PM (#25666529)
The 5nm vs 7nm vs 10nm vs whatever nm narrative is highly reminiscent that of clock rate flame wars raging in the tech bubble over a decade ago. Back in the early aughts, when the great engineering was still a thing, alternative CPU designs (DEC Alpha 21264, MIPS 10k/12k, PA RISC, POWER and later UltraSPARC designs) were consistently outperforming any x86 design by at least an order of magnitude or more whilst being clocked at 30% to 50% less of the x68 designs, especially in FP operations. The alternative designs explored and utilised wider and deeper pipelines, bigger L1 caches and various optimisations across the entire CPU arch. Every alternative CPU design had something unique to offer, and that was a great thing to read about and study.

The commoditisation of the PC hardware has driven great CPU designs into an extinction. Heck, even Oracle, that are now in the business of litigation for fun and a massive profit, with its prodigious cash war chest has discontinued the UltraSPARC architecture due to it requiring extraordinary investments on multiple fronts. PC users have long been forced to be content with whatever bone the CPU architecture coloniser would throw at them. There appears to be a resurgence of the great engineering with M1, and, hopefully, that will lead to more of the thoughtful engineering in medium to long term.

M1 is fast due to: a solid, single vision of what a modern CPU should be like, continuous investment into R&D over an extended period of time, a well concerted effort of the engineering, design ideas reuse across multiple product lines, supply chain management, and, of course, the manufacturing process. Nanometers do not make for a great CPU design but rather play a supporting role. If the nanometers were so important, the 2017 POWER9 design manufactured at a 14 nm process with a smaller L1 cache would not have been able to outperform any existing x86 design in 2020 in both, single core and multi core (with 25% to 50% lesser number of physical cores) setups? Ryzen 3 has narrowed the gap, but POWER9 still takes the lead and POWER10 is around the corner.

There is a great quote by Michael Mahon, a principal HP architect, in the foreword to the PA RISC 2.0 CPU architecture handbook from 1995:

The purpose of a processor architecture is to define a stable interface which can efficiently couple multiple generations of software investment to successive generations of hardware technology. Stability and efficiency are the goals, and the range of software and hardware technologies expected during the architecture’s life determine the scope for which the goals must be achieved

...

Efficiency also has evident value to users, but there is no simple recipe for achieving it. Optimizing architectural efficiency is a complex search in a multidimensional space, involving disciplines ranging from device physics and circuit design at the lower levels of abstraction, to compiler optimizations and application structure at the upper levels.

Because of the inherent complexity of the problem, the design of processor architecture is an iterative, heuristic process which depends upon methodical comparison of alternatives («hill climbing») and upon creative flashes of insight («peak jumping»), guided by engineering judgement and good taste.

To design an efficient processor architecture, then, one needs excellent tools and measurements for accurate comparisons when «hill climbing,» and the most creative and experienced designers for superior «peak jumping.» At HP, this need is met within a cross-functional team of about twenty designers, each with depth in one or more technologies, all guided by a broad vision of the system as a whole.

Well executed holistic approach is the reason why the entry level M1 is fast. We need more of «holistic-ism» in engineering everywhere.

Re:Memory access on the Apple M1 processor by icedchai on Thursday January 07, 2021 @06:13PM (#25678974)
Sorry, but alternate CPU designs were never outperforming x86 by an "order of magnitude", especially not at a lower clock speed. That is a complete exaggeration. I was around during that time period and can find nothing that supports this. The Alpha was fast, yes, but you're talking 2 to 3x best case with floating point compared to a 2 to 3x cheaper Intel system. I did find some old benchmarks: http://macspeedzone.com/archive/4.0/WinvsMacSPECint.html

UltraSPARC was not very competitive. Those machines were very, very expensive and you didn't get much bang for the buck. They weren't even that fast. The later chips had tons of threads but single threaded performance was pretty bad...

Re:Memory access on the Apple M1 processor by baybal2 on Wednesday January 06, 2021 @02:29PM (#25661224)
> There is no "magic" at play here, it's just lots and lots of raw muscle. They just seem to have a freakishly successful strategy for choosing what aspects of the processor to throw that muscle at.

There is no freakishly successful strategy at play there as well. It's just all previous attempts at "fast ARM" chip were rather half hearted "add a pipeline step there, add extra register there, increase datapath width there," and not to squeeze it to the limit.

Re:Memory access on the Apple M1 processor by barkingcat on Wednesday January 06, 2021 @02:59PM (#25661503)
The answer is that they have raw hard numbers from the hundres of millions of iPads/iPhones sold each year, and can use the metrics from those devices to optimize the next generation of devices.

These improvements didn't come from nowhere. It came from iterations of iOS hardware.

Re:Memory access on the Apple M1 processor by SurfingInVR on Wednesday January 06, 2021 @05:40PM (#25663661)
Something I've seen no one else mentioning: Apple's low-spec tier is $1000, not $70.
Re:Memory access on the Apple M1 processor by square_usual on Thursday January 07, 2021 @12:14AM (#25667520)
It's $699, for a complete device, not a part of one.
Re:Memory access on the Apple M1 processor by perryizgr8 on Thursday January 07, 2021 @03:30AM (#25668658)
What's the screen resolution on that $699 "complete device"?
Re:Memory access on the Apple M1 processor by square_usual on Thursday January 07, 2021 @07:43AM (#25670369)
Comparable to a $70 processor, at least.
Re:Memory access on the Apple M1 processor by FreshFries on Thursday January 07, 2021 @05:37AM (#25669505)
5120 by 2880
Re:Memory access on the Apple M1 processor by acdha on Wednesday January 06, 2021 @02:12PM (#25661062)
> What enabled/led them to make those choices where others haven't?

Others have to some extent — AMD is certainly not out of the game — so I'd treat this more as the question of how they've been able to go more aggressively down that path. One of the really obvious answers is that they control the whole stack — not just the hardware and OS but also the compilers and high-level frameworks used in many demanding contexts.

If you're Intel or Qualcomm, you have a wider range of things to support _and_ less revenue per device to support it, and you are likely to have to coordinate improvements with other companies who may have different priorities. Apple can profile things which their users do and direct attention to the right team. A company like Intel might profile something and see that they can make some changes to the CPU but the biggest gains would require work by a system vendor, a compiler improvement, Windows/Linux kernel change, etc. — they contribute a large amount of code to many open source projects but even that takes time to ship and be used.

Re:Memory access on the Apple M1 processor by astrange on Thursday January 07, 2021 @12:28AM (#25667591)
Intel does lots of contributions across the OS (Linux and glibc) to compilers including their own (gcc, icc, ispc, etc). Their problems aren't their ability, it's that Intel is poorly managed and internal groups are constantly fighting with each other.

Also, compiler support for CPUs is very overrated. Heavy compiler investment was attempted with Itanium and debunked; giant OoO CPUs like Intel's or M1 barely care about code quality, and the compilers have very little tuning for individual models.

Re:Memory access on the Apple M1 processor by acdha on Thursday January 07, 2021 @09:05AM (#25671135)
> Intel does lots of contributions across the OS (Linux and glibc) to compilers including their own (gcc, icc, ispc, etc). Their problems aren't their ability, it's that Intel is poorly managed and internal groups are constantly fighting with each other.

I wasn't just talking about Intel but the concept of separate CPU and compiler vendors in general. Intel contributes a ton of open source but even if they were perfectly organized it takes time for everything to happen on different schedules before it's generally available: get patches into something like Linux or gcc, wait possibly years for Red Hat to ship a release using the new version, etc. Certain users — e.g. game or scientific developers — might jump on a new compiler or feature faster, of course, but that's far from a given and it means they're not going to get the across-the-board excellent scores that Apple is showing.

> Also, compiler support for CPUs is very overrated. Heavy compiler investment was attempted with Itanium and debunked; giant OoO CPUs like Intel's or M1 barely care about code quality, and the compilers have very little tuning for individual models.

This isn't entirely wrong but it's definitely not complete. Itanium failed because brilliant compilers didn't exist and it was barely faster even with hand-tuned code, especially when you adjusted for cost, but that doesn't mean that it doesn't matter at all. I've definitely seen significant improvements caused by CPU family-specific tuning and, more importantly, when new features are added (e.g. SIMD, dedicated crypto instructions, etc.) a compiler or library which knows how to use those can see huge improvements on specific benchmarks. That was more what I had in mind since those are a great example of where Apple's integration shines: when they have a task like “Make H.265 video cheap on a phone” or “Use ML to analyze a video stream” they can profile the whole stack, decide where it makes sense to add hardware acceleration, and then update their choice of the compiler toolchain and higher-level libraries (e.g. Accelerate.framework) and ship the entire thing at the time of their choosing whereas AMD/Intel/Qualcomm and maybe nVidia have to get Microsoft/Linux and maybe someone like Adobe on board to get the same thing done.

That isn't a certain win — Apple can't work on everything at once and they certainly make mistakes — but it's hard to match unless they do screw up.

Re:Memory access on the Apple M1 processor by astrange on Thursday January 07, 2021 @06:40PM (#25679249)
> Itanium failed because brilliant compilers didn't exist and it was barely faster even with hand-tuned code, especially when you adjusted for cost, but that doesn't mean that it doesn't matter at all.

What you said is true for libraries, I just don't think it's true for compiler optimizations. Even Apple's clang just doesn't have any new optimizations that work on their own; there are certainly new features but they're usually intrinsics and other things that need to be adopted by hand. They thought this would happen (it's what bitcode was sold as doing) but in practice it has not happened.

Re:Memory access on the Apple M1 processor by smoldesu on Wednesday January 06, 2021 @10:58PM (#25667127)
The big "enabler" was their mass-purchase of 5nm lithography across the board. Even still though, 4ghz*8c isn't anything new, and isn't really that remarkable besides the low TDP (which is incidentally dwarfed by the display, which draws up to 5x more power than the CPU does). I think the big issue is that Apple has painted themselves into a corner here: ARM won't play nice with the larger CPUs they want to make, and the pressure for them to provide a competent graphics solution on custom silicon is mounting. They spent a lot of time this generation marketing their "energy efficiency" and battery life, but many consumers/professionals (myself included) don't really care about either of these things.
Re:Memory access on the Apple M1 processor by krunkcoin on Thursday January 07, 2021 @10:03PM (#25681027)
"the display, which draws up to 5x more power than the CPU does" - wat? Apple-supplied monitoring tools report that M1 under full load (all CPU and GPU cores) can draw over 30 watts. Laptop displays don't consume 150 watts. If anything, the displays in either of the M1 portables likely consume about 5 times less than 30W, even at full brightness.

"ARM won't play nice with the larger CPUs they want to make" - wat? Apple holds an architectural license. This means they paid a lot upfront a long time ago and therefore have a more or less perpetual right to design their own Arm cores without input from Arm.

"a competent graphics solution" - Also wat? M1 has an excellent GPU. It doesn't compete with discrete GPUs that use 300 watts, but that's fine: M1 is the chip for entry level Macs, designed for the smallest and lightest segments of their notebook line. And in that product segment, it has been every bit as much a revelation as the CPU. It's very fast, and uses little power given the performance.

What exactly do you think is going to happen when they scale that basic GPU design up? Despite your dismissiveness, in modern silicon architecture energy efficiency is incredibly important: for any given power budget, the more efficient you are the more performance you can deliver. The performance Apple gets out of about 10W on M1 suggests they'll have few problems building a larger GPU to compete with Nvidia and AMD discrete GPUs.

Re:Memory access on the Apple M1 processor by dv_dt on Wednesday January 06, 2021 @05:44PM (#25663715)
No fighting the sales department on where to put the market segmentation bottlenecks?
Re:Memory access on the Apple M1 processor by gavin_gee on Wednesday January 06, 2021 @03:26PM (#25661937)
didnt they also make some interesting hires a few years ago like Anand from Anandtech and some other silicon vets that likely helped them design the M1 approach?
Re:Memory access on the Apple M1 processor by gameswithgo on Wednesday January 06, 2021 @01:59PM (#25660912)
I see two main things behind it:

1. they are the only ones who have 5nm chips because they paid a lot to TSMC for that right 2. they gave up on expandable memory, which lets them solder it right next to the cpu, which likely makes it easier to ship with really high clocks. and/or they just spent the money it takes to get binned lpddr4 at that speed.

So a good cpu design, just like AMD and Intel have, but one generation ahead on node size, and fast ram. Its not special low latency ram or anything, just clocked higher than maybe any other production machine, though enthusiasts sometimes clock theirs higher on desktops!

Re:Memory access on the Apple M1 processor by epistasis on Wednesday January 06, 2021 @02:52PM (#25661450)
> So a good cpu design, just like AMD and Intel have

The design seems to be very different, in that it's far far wider, and supposedly has a much better branch predictor.

> fast ram

Is that a property of the RAM clock, or a function of a better memory controller? The RAM certainly doesn't appear to have any better latency.

Re:Memory access on the Apple M1 processor by gameswithgo on Wednesday January 06, 2021 @03:14PM (#25661746)
Right, latency isn't (much) affected by a higher clock rate. Getting ram to run fast requires both good ram chips and good controller/motherboard.

and yes, obviously apples bespoke ARM cpu is quite a bit different than Zen3 Ryzens x86 cpu, but I'm not sure it is net-better. When Zen4 hits at 5nm I expect it will perform on par or better than the M1, but we won't know till it happens!