1/ In case you were wondering: Apple's replacement for Intel processors turns out to work really, really well. Some otherwise skeptical techies are calling it "black magic". It runs Intel code extraordinarily well.
2/ The basic reason is that Arm and Intel architectures have converged. Yes, the instruction sets are different, but the underlying architectural issues have become very similar.
3/ The biggest hurdle was "memory-ordering", the order in which two CPUs see modifications in memory by each other. It's the biggest problem affecting Microsoft's emulation of x86 on their Arm-based "Surface" laptops.
4/ So Apple simply cheated. They added Intel's memory-ordering to their CPU. When running translated x86 code, they switch the mode of the CPU to conform to Intel's memory ordering.
5/ With underlying architectural issues ironed out, running x86 code simply means translating those instructions to the Arm equivalent. This is very efficient and results in code that often runs at the same speed.
6/ Sometimes there isn't a direct equivalent, so the translation results in slightly slower code, but benchmarks show x86 being consistently at least 70% of the speed.
7/ In any case, a surprising number of popular apps already run on it. Apple seeded developer systems a few months back, allowing people to get their code ready.
8/ Normally, that wouldn't have been enough time. When you recompile code for a new architecture, it usually breaks. But as I said above: Arm and Intel architectures have converged enough that code is much less likely to break, making recompiling easier.
9/ Apple has made surprising choices. They've optimized JavaScript, with special JavaScript-specific instructions, double sized L1 caches, and probably other tricks I don't know of.
10/ Thus, as you browse the web, their new laptop will seem faster and last longer on battery, because JavaScript, even though other benchmarks show it roughly the same speed as Intel/AMD.
11/ The older MacBook Air had a dual core CPU that ran at 3.8 GHz, but when in low-power mode, 1.2 GHz. Switching between fast and slow modes is how it conserves power for mobile.
12/ But it's ultimately inefficient. The Intel CPU is designed to run at 5 GHz. Downclocking to 1 GHz saves power -- but not as much as if you'd designed the processor to run at 1 GHz to begin with.
13/ Apple's strategy is to use two processors: one designed to run fast above 3 GHz, and the other to run slow below 2 GHz. Apple calls this their "performance" and "efficiency" processors. Each optimized to be their best at their goal.
14/ When they need to conserve power, they turn off the "performance" processors and run code on their "efficiency" processors. They have 4x performance processors (twice that of their older Macs) plus 4x efficiency processors.
15/ All 8 can be active. When doing something that can use 8 processors, such as compiling code, it goes real REAL fast. 8 processors vs. 2 processors in their old notebooks make a difference.
16/ A big part of this story is that Intel is about 3 years behind on Moore's Law. Apple Silicon uses the latest 5nm tech from TMSC, while Intel uses the older 10nm/7nm generation. Much of Intel's product line uses the even older 14nm/10nm generation.
17/ None of this is actual "black magic". It's all pretty understandable. It's just all the various things have been executed really well, leading to a combined result that is a great leap forward.
18/ Another "magic" trick is how their "Swift" programming language uses "reference counting" instead of the "garbage collection" in Android. They did something in their CPU to double the speed of reference counting.
19/ ...even when translating x86 code, all that reference counting overhead (already more efficient than garbage collection) gets dropped in half. Yet another weird performance enhance to add to all the others.

• • •

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with Robᵉʳᵗ Graham

Robᵉʳᵗ Graham Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @ErrataRob

Apr 26
It's not complex. Good moderation is different from bad censorship. The only reason confusion exists is because people deliberately confuse the two issues, as in the case below.
Those who want to censor opinions they disagree with claim all they want is "moderation".
Those who were legitimately moderated for doing bad things claim they were "censored".
The most important contribution Musk can make isn't changing any of the current "moderation" policies but in making them more "transparent" and "accountable".

A good example is a truth and reconcialation over how the NYPost Hunter laptop story was censored.
Read 6 tweets
Apr 24
On both-sidism:

PRESIDENTS DON'T RUN THE ECONOMY and candidate's economic plans are fiction, designed to stroke the ignorance and prejudice of voters, and the mass media willingly plays along with the fiction.
When people criticism "both-sidism", it's because their head is so far up the ass of one side they can't see the other. Instead, they can only draw a cynical caricature of the opposing side -- thus arguing there aren't two valid sides.
The two sides here are popularism (Trump) vs. centrism (Hillary, Biden). It's an easy political-science discussion to have when talking about foreign elections, like the recent win in France by (centrist) Macron in France over (populist) opponent Le Pen.
Read 5 tweets
Apr 21
What bothers me about this is the abject failure of basic civics. Are we not teaching civics in school anymore? or does everyone simply forget civics?

Biden won because he got the most electoral votes.
But what if there were massive fraud? if the Democrats actually stole the election?

The answer is still "Biden won because he had the most electoral votes" according to the law.

There is no "Trump actually won". That requires rejection of the concept of "rule of law".
It's really no different than 2016 when some Democrats claimed Hillary actually won because she received more of the popular vote.
No, we live in a system of "rule of law", and Trump won the most electoral votes, and that's all that matters.
Read 18 tweets
Apr 21
So #SoftwareDevelopment is trending in my timeline, and it's full of crap advice.

Here is an example, the problem with meaningless names, telling programmers to make more descriptive variables. This is absurdly stupid advice.
The actual problem is "empathy", seeing code from the point of view of a stranger, or even yourself a year later when you need to reread the code. You have to put yourself in their shoes, to see your code from their point of view.
A variable's purpose should be derived from its name, not the other way around.

For example, you extract a row from a database containing a person's details. Don't call it "row", call it "person" as the variable name.
Read 25 tweets
Apr 20
Poor Netflix stock dropped 'cause their subscriber growth stopped. I thought I'd create a thread of things I've enjoyed on Netflix.

To start with, the [subtitled] "Servant of the People", staring comedian Volodymyr Zelenskyy as the president of Ukraine. Uh ... timely? Image
Space Force season 1 was fun. Season 2 was ass. It got low ratings by critics, but they were wrong (about Season 1). It was quirky and weird with really fun characters. Don't bother with the second season, though. Image
"Russian Doll" was bizarrely original. It's totally not anything like "Groundhog Day".

I haven't seen Season 2 yet, but Season 1 was pretty awesome. [scifi?] Image
Read 15 tweets
Apr 7
There is no objective definition of "disinformation". Instead, "disinformation" is only "things you disagree with". You really can't have a discussion of "disinformation" without discussing Hunter Biden's laptop.
Hunter Biden's laptop is garbage, of course. But it's not "disinformation" according to the definition. The contents appear true, some have been verified, although they are misleading.
Yet, major news outlets dismissed it as disinformation -- even as verified that the most salacious of the emails was authentic.
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!


0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy


3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!