ARM MacBook vs. Intel MacBook
lemire.me
lemire.me
>On the floating point and vector execution side of things, the new Firestorm cores are actually more impressive as they a 33% increase in capabilities, enabled by Apple’s addition of a fourth execution pipeline. The FP rename registers here seem to land at 384 entries, which is again comparatively massive. The four 128-bit NEON pipelines thus on paper match the current throughput capabilities of desktop cores from AMD and Intel, albeit with smaller vectors. Floating-point operations throughput here is 1:1 with the pipeline count, meaning Firestorm can do 4 FADDs and 4 FMULs per cycle with respectively 3 and 4 cycles latency. That’s quadruple the per-cycle throughput of Intel CPUs and previous AMD CPUs, and still double that of the recent Zen3, of course, still running at lower frequency. This might be one reason why Apples does so well in browser benchmarks (JavaScript numbers are floating-point doubles).
Vector abilities of the 4 pipelines seem to be identical, with the only instructions that see lower throughput being FP divisions, reciprocals and square-root operations that only have an throughput of 1, on one of the four pipes.
https://www.anandtech.com/show/16226/apple-silicon-m1-a14-de...
Compare this to a design like AVX/AVX2 that has wider 256-bit vectors, but almost always forces the programmer to treat them as two 128-bit vectors glued together. All because Intel realized they had to power down half of each vector ALU to save power at idle.
Of course, the future is hopefully more flexible vector ISAs like SVE. AVX-512 is not too bad either today, but Intel seems almost pathologically opposed to making forward-looking decisions (what about when they want to double the vector width again??).
So are there 4 or 8?? I believe what they meant to say was 4 FADDs OR 4 FMULs.
Then they say it has quadruple the throughput of Intel and older AMD chips, but that doesn't follow unless this does 8 floating point operations per cycle not 4.
The image of the pipeline only shows 4 so I think this is 4x128 wide, which is good but not going to compete with Zen3 with its wider registers. It is also not quadruple the throughput of Intel or AMD for SIMD..
If you work in JS and Node (say doing unit tests for an angular web app) this machine is so much better it’s unbelievable. It’s probably less than half the time to run tests. Half. It’s real productivity change.
God I hate this timeline.
“As technology advances, the rendering time remains constant.”
https://www.fxguide.com/fxfeatured/founders-series-industry-...
But then again, I might as well wait for the next iteration of Apple Silicon if that is the case.
When I set up my M1 mac I compiled as much as I could from source using the ARM Homebrew, and for everything else I installed it via the x86 Homebrew.
Does anyone know where the Intel chip greatly outdoes the M1?
https://www.macrumors.com/2020/11/15/m1-chip-emulating-x86-b...
https://www.computerworld.com/article/3597949/everything-you...
https://www.imore.com/tests-show-apples-m1-emulates-x86-fast...
In all other respects the M1 stomps the TGL.
Traditional POSIX mutexes in MacOS weren’t heavily optimized. When I worked at Apple ~5 years ago they still didn’t have a good futex implementation (not sure if that’s changed since). Generally the OS team doesn’t care because you should be using libdispatch.
Anyway I’d love to read up on where you encountered this claim so I can better understand the countours of how this thing works.
go test -test.bench=Cond2 --test.run=ZZ --test.cpu=1,2,4 sync
For me: goos: linux
goarch: amd64
pkg: sync
BenchmarkCond2 3575089 336 ns/op
BenchmarkCond2-2 3236198 370 ns/op
BenchmarkCond2-4 2831134 420 ns/op
goos: darwin
goarch: arm64
pkg: sync
BenchmarkCond2 5903233 190.4 ns/op
BenchmarkCond2-2 85038 27434 ns/op
BenchmarkCond2-4 2500750 677.9 ns/op
Way, way worse in the 2- and 4-thread cases on the mac. I don't know why, and the performance of the 2- case swings all over the place.There was another comment here that was deleted that accidentally showed the output of running x86-64 go on the M1. That's another weird risk at the user level, that you may unknowingly run the wrong binary through rosetta2 instead of running the native one.
goos: darwin
goarch: arm64
pkg: sync
BenchmarkCond2 4849542 249.7 ns/op
BenchmarkCond2-2 2639139 531.1 ns/op
BenchmarkCond2-4 3112030 393.1 ns/ophttps://github.com/golang/go/commit/c15593197453b8bf90fc3a90...
https://github.com/chriselrod/VectorizationBase.jl/issues/22
I do a lot of SIMD optimization, so it'll be interesting to see how the M1 competes once there's native support in Julia.
M1 = 4x128
Zen3 = 4x256
Intel = can't make up its mind some are 2x256, others 2x512, and some others are weird combos like (2x256 or 1x512)
M1 on paper looks half throughput compared to Zen3 SIMD per cycle, but because of larger caches and lots of other small advantages it probably closes that margin a little.
Zen3/Intel are also running at higher clock rate, at least on a desktop version.
https://www.sisoftware.co.uk/ is a good benchmark for SIMD code, but it is Windows so no M1 results:(
Another comment mentioned 4, 2 of which are fma. Works this imply that a matmul kernel for zen3 should have a 2:1 ratio of fmas to mul+add?
His performance posts are usually very insightful on things that are usually noise in other contexts (like division).
Not excusing the post, but the author has a history of interesting articles
| | i5-9600k | i7-7700HQ | Apple M1 |
|strtod | 217.97 MB/s | 80 MB/s | 115 MB/s |
|abseil | 613.48 MB/s | 460 MB/s | 580 MB/s |
|fastfloat | 1400.15 MB/s | 1000 MB/s | 1800 MB/s |What a leap.
Compare to the 2012 MBPr, a similarly innovative Apple laptop. The 2012 was $2,199 in 2012 dollars (nearly $2,500 today). This is that kind of leap, and more. $999 (sometimes $899) is a bargain.
I've been blown away at how much faster/snappier it feels in day to day use compared to my 2018 16GB MBP. With the COVID situation I'm seated at my home office 95% of time now, rather than ~35%.
One of the biggest changes has been that instead of having a jet engine level of noise next to me most of the day now, I have something that I haven't heard a noise from once in three or four days. It takes up way less desk space as well. It's much easier to tuck away somewhere than a laptop which you always have an emotional connection to needing portability with. I've had Photoshop, Illustrator, Media Encoder running encodes, After Effects, loads of web tabs open and it still feels cold to touch. More desk space, faster, less noise, less heat. It's ticked all those boxes.
I don't understand why Apple doesn't make a high-end multi port USB-C dock after all these years. Third-party quality isn't consistent.
Also, the colour profile/difference between two identical monitors, one connected on HDMI, one on USB-C was startling. No idea why... I had to spend 20 minutes with Apples advanced calibration tool get them to match up. Even selecting the same colour profiles on both monitors gave a staggering difference in colour representation which I found very odd.
BUT the possibility of familiar OS' coming out with ARM versions (or just the x86 versions being emulated well), and the possibility of a more powerful M1-style processor with more than 16gb RAM anyway makes me want to wait.
But honestly if they roll out a better processing still with only 16gb RAM I guess I'll pull the trigger on one of the models.
But I subscribe to far too many mods in Cities:Skylines to get away with 16GB of RAM - unfortunately.
This MBA is way past expiration date so hopefully I don't have to wait more than six months (I suspect a fairly safe bet).
I'm almost there. I always liked the newer form factor and my main plan was to wait for USB-C to become more prominent, and as a bonus Apple even got rid of the butterfly keyboard! So even thats not a blocker any more.
A very fast machine with only 16gb ram would be okay for me. But I do want an upgrade in that department.
The M1 can process twice as many instructions per clock cycle than an x86 processor can.
Experience: Designed SPARC, ARM, and x86 CPUs
>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...
It's not as incredibly incorrect as you may think.
An x86 instruction can be as big as 15 bytes and there's no easy way for the decoder to know where one instruction ends and the next one begins.
All ARM instructions are one size, making instruction decoding more efficient and makes out of order processing faster as well.
More details at https://debugger.medium.com/why-is-apples-m1-chip-so-fast-32...
I suspect you haven't internalized this, because reiterating the complexity of decoding instructions just isn't a valid response. The entire point is avoiding that cost.
It could be more accurate to say the M1 can process twice as many half as complex instructions as x86.
Case in point is the Samsung Exynos M3, which despite its 6-wide decoder is barely competitive with the 3-wide ARM Cortex-A76. The Exynos would fare very poorly against any recent 4-wide Intel or AMD CPU.
The crazy thing about the M1 is that every structure in the CPU is huge - the decoders, the ROB, the number of execution units, even the caches. And apparently all of it is implemented very efficiently.
The M1 has 128-bit NEON SIMD, and given its decode pipeline and cache efficiency it seems more likely to actually benefit entirely from it. AVX on Intel devices is often of limited value because it's either memory starved or gets throttled (many SKUs throttle once you start using AVX).
I've had cases where vectorizing ongoing sequential processing in the most optimal fashion available barely gave a single digital percentage increase. 9 times out of 10 it's snake oil.
But regardless, if there's an example that would make the M1 look bad, do it.
It may be entirely imaginary but I always felt like the PowerPC versions of OS X were more responsive than their Intel counterparts, despite running on CPUs that were at a disadvantage in terms of clock speed. I wonder how much of that was due to the PowerPC arch itself.
There was a paper that really got my attention, from US Air Force research I think, that reported a micro benchmark on a Mac Mini G4 where the AltiVec scores blew away their best Silicon Graphics beast.
The M1 reports feel a lot like that. Or better, because of the reports coming in on huge performance gains in real world apps.
(And this is from someone who spends a lot of time trying to correct the misconception that the M1 outperforms all competitive processors.)
[0] https://www.anandtech.com/show/16252/mac-mini-apple-m1-teste...