Learn how the central processing unit (CPU) works in your computer. Compare performance and processor architecture between the Intel and Apple Silicon M1 chips with @AZisk 

#compsci #tech #100SecondsOfCode

🔥 Subscribe to Alex's Channel 🔥

https://www.youtube.com/channel/UCajiMK_CY9icRhLepS8_3ug

🔗 Resources

Apple Silicon Breakdown https://www.macrumors.com/guide/apple-silicon/
Visual CPU http://visual6502.org/
Clock Speed https://www.intel.com/content/www/us/en/gaming/resources/cpu-clock-speed.html

📚 Chapters

00:00 How a CPU Works
01:06 Instruction Cycle
02:25 Apple M1 vs Intel i9
06:10 Performance Benchmarking
9:06 Best Dev Stacks for M1
10:12 Worst Stacks for M1
11:55 Final Summary

🔥 Watch more with Fireship PRO

Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment. 

🎨 My Editor Settings

- Atom One Dark 
- vscode-icons
- Fira Code Font
2024-02-04T14:07:55.700Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
3a6d9de9-7e83-458a-8953-702351170df6
8bdf5c4e954a1aa5629f86554242c1520890a863f42e4009b230bc8199c3ad6d
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
The Central Processing Unit, or CPU, is like the engine in your car or the brain in your skull, and is like a really fancy calculator used to run the applications on your computer.
When you write software in a language like JavaScript or Python, you're actually writing a set of instructions that will be execute it as machine code by a CPU, which itself is a carefully crafted piece of metal and silicon that contains billions of tiny transistors or on off switches that represent ones and zeros.
To perform mathematical calculations, a CPU will combine multiple transistors together to form logic gates.
For example, and will take 2 binary inputs and validate that both are true to produce a true output.
It only takes a few basic logic gates to solve really complex computational problems.
Modern chips contain billions of transistors and they can be flipped on and off billions of times per second.
The state of the CPU is synchronized by an oscillator known as the clock generator.
In general, the more times the clock can pulse per second, the faster the CPU can compute, and is normally measured in gigahertz.
Gamers will sometimes overclock their CPUs to gain more performance at the cost of higher temperatures and a lower life expectancy.
Now in order to run applications, it interacts with the system memory or RAM in a series of 4 steps known as the machine or instruction cycle.
Step 1 is the fetch phase.
Think of a software program as a set of instructions stored in the RAM.
The CPU has registers temporarily store the address in memory that it wants to interact with.
The program counter starts at 0 and copies that address to the memory address register.
Then the control unit sends out a signal to copy the data from that address to the instruction register.
At which point, it needs to figure out how to use this instruction in the decode phase.
The control unit parses the actual bits in the instruction.
Most importantly, the opt code contains the instruction, like add or subtract, and the operand is the address in memory to perform that operation on.
The final execute stage takes the decoded information and passes it as electrical signals to the relevant parts of the CPU.
The Arithmetic Logic Unit or ALU, can perform math on the data and then store the results in RAM to change the state of the program.
The cycle is repeated billions of times per second and modern chips, utilize multiple CPU cores to run multiple computations in parallel.
That's how a CPU works under the hood, but there's a lot more you should know about processor architectures if you're a developer.
And that's why I've invited Alex from the most underrated tech channel on YouTube to break down some more advanced concepts like Apple Silicon and how to run performance benchmarking on your own machine.
Hi, everybody.
My name is Alex and I'm here to take you beyond 100 seconds in your quest to learn about how processor architectures differ And also how those differences affect our productivity as developers.
I'll show you what the Apple Silicon chip and a refrigerator have in common, And then I'll share some of my own experiences with using developer tools and build execution on the 1st generation Apple Silicon chip call the M1 Chip as compared to the Intel Chip.
1st and foremost, I just wanna say that my personal productivity as a developer depends less on processors inside my computer and more on how much coffee I had and whether I'm trying to work after a big meal.
But aside from human factors, let's dig deeper into why the new Apple Silicon machines have been really kicking up a storm and changing the industry, Software development included.
And spoiler alert, the m one machines have been beating the Intel machines in pretty much every build test I've thrown at it, except a couple.
But it's not all roses, so let's talk about some downsides later too.
So why is it so darn fast?
Test.
The first point I wanna discuss is the physicality differences of the new Apple Silicon way versus the old Intel call an AMD way.
This is what Apple silicon and your refrigerator at home have in common.
Alright.
Imagine for a minute that you wanna make a turkey with cheese sandwich.
You go over to the refrigerator and in one place, you have the turkey breast, the cheese, the mayonnaise, the mustard.
All those ingredients are right there in one place and you don't have to run around the house to gather them.
You don't have to drive to lots of stores to pick them up and this saves you lots of time and energy.
This kind of efficiency can be found in the new Apple Silicon Chips because they aren't just a new processor.
Apple Silicon is a collection of many chips that are housed inside one silicon container.
And this type of system is known as a system on chip or sock And it's essentially an entire computer on one chip.
The main CPU, the GPU, the IO controller, the ML engine, They're all collocated, so when the task is to make an electronic sandwich, so to speak, or in other words, to do some work that involves all these different components, A system on chip is going to be a lot more efficient in terms of energy usage using only a tiny bit of power and at the same time is going to be faster than say a typical machine that has all the components separate.
Intel based machines have a CPU that's a single chip.
And memory is located somewhere else on the motherboard.
The IO is somewhere else.
The individual components might be even more powerful than the ones available at the moment on the latest Apple Silicon based machines, but that comes at a cost since these powerful components are like supermarkets That carry different sandwich ingredients.
As a result, when you want a sandwich on an Intel machine, you'll have to drive all over town because one store will have the turkey, another store will have the cheese, yet another store will have the mayonnaise.
Each store might be really good at their own process and have the best ingredients.
But each store also takes a lot of power to run, losing out on the efficiency.
And since all you really want is just to make a simple sandwich, you're wasting Taking a ton of time and energy picking up the ingredients from all the different stores.
Of course, some might say the drawback with come on chip design is that, at least for now, with the current selection of Apple Macs, you won't be able to upgrade or change any of the components.
You get what's on the menu and that's it.
But that's not news to most people that are familiar with the Apple ecosystem.
Once you accept that idea, you might even see the benefits of having a more efficient design where where all the components are on one chip and they outweigh the cons and still provide better performance than the alternative.
Alright.
That's enough talk about food.
So how does this all affect real world development workflows?
So I've been doing a bunch of developer focused tests on the latest Apple Silicon machines over on my channel as well as comparing them to other machines like the Intel Macs and PC machines too.
And in general, the new design has been showing really great promise for my own workflows as a developer, coffee and sandwiches excluded.
Now there Are lots of technology stacks that developers use, of course, and I'm trying builds in a few of them.
But now, let me share some of the results I've seen with Node and JavaScript tests.
And after that, I'll also discuss the tech stacks that have the biggest gains on the new machines and also the stacks that have the biggest losses right now at the moment.
I started off trying out some existing JavaScript tests that are in the browser and then in Node.
The browser test consisted of running speedometer, Which is a browser benchmark that measures the responsiveness of web applications.
It uses demo web apps to simulate their actions such as adding to do items.
You visit the app in the browser of choice.
I tried Chrome and Safari for this, and you execute the automated test that runs through a collection of applications built with some of the more popular UI frameworks like Angular, React, Ember, even vanilla JS and jQuery, and a whole bunch more.
And then this test reports the results as a single number when it's done.
This number represents the runs per minute and the higher the better.
When it was finished, I found that it has significantly more iterations on the m one.
Safari had the best results even going off the scale and Chrome did pretty well too.
I also ran some JavaScript benchmarks in a node environment and found a pretty CPU intensive algorithm called fan cook redux That's implemented in JavaScript and created for benchmarks game, a website that collects algorithms and tests in different languages.
And while my 16 inch MacBook Pro with the Intel Core I9 Processor did beat the MacBook Air with the M1 Chip, it really didn't do so by a lot.
And when you consider the price differences between the machines and the fact that the m one stayed cool throughout the test and that the battery hardly even took a hit on the m one, You might be thinking whether the extra few seconds saved while running this benchmark on the Intel I9 is really worth the money.
So running benchmarks is often very telling, But it doesn't necessarily line up with real world scenarios.
So that's why I also like to conduct my own tests, whether using my own projects Or other open source projects that are out there and that commenters sent to me.
And here's what I found.
I ran a build of the official NativeScript plugins repository, which is project based on NX workspaces.
If you're not familiar with NX workspaces, it allows you to scale large JavaScript and other tech stack projects, And you can see the NX quick start right here on this channel.
In my test, the build that took about 3 minutes on each machine only differed in build time by tens of seconds.
With the M1 MacBook Air beating out the Intel MacBook Pro 2 out of 3 times.
So let's talk about what dev stacks benefit the most from the new Apple Silicon chips at this time.
For JavaScript developers, the benefits are already visible.
However, if you're building mobile apps for iOS for compiling c plus plus code, then this is where you'll see a 40 to 50% improvement in build times.
I ran a few x code builds and swift builds, And I did some c plus plus algorithms and built OpenCV and Webkit.
In all those tests, the m one came out on top.
So what dev stacks benefit the least?
So far in my own testing, any builds that have to do with running natively built software and building using native tooling has absolutely destroyed intel and speed and battery performance, native being compiled for the Apple Silicon architecture.
Even when running some software via Apple's Rosetta, That's the translation layer that allows you to run Intel and AMD based x64 and x86 programs on the new Apple hardware.
Even some of those software packages ran better than on Intel.
And that's just amazing.
But there are workflows that aren't ready yet, in my opinion.
If you are an Android developer, Android Studio And official Android emulators work on Apple Silicon, but they're currently using Rosetta for translations.
And while Rosetta is generally pretty good at running x86 targeted code on arm chips, it's not enough for the CPU hungry Android workflows and I found the results to be not very usable at the moment.
The latest version of dot net, which is version 5 right now, Isn't fully supported to run on ARM.
Simple console applications ran just fine for me, but testing any web work flows like asp.netcore.
Doesn't work at all yet.
Now it's expected that by the end of this year, dot net 6 will come out.
It's in alpha right now and we'll have full support for Arm.
Until then, if you need to develop dot net apps, I suggest using a PC with Windows.
Oh, and if you think you can use a virtual Windows machine, I've tested this as well.
Parallels is the only vendor that currently supports the m one chip to create a virtual Windows environment, but the issue is that the Windows guest operating system for Arm is still quite immature and needs a lot of work.
Also, Visual Studio 2019, the latest Visual Studio offering from Microsoft, is unfortunately not compatible with ARM at all And in my test is not stable even using the built in Windows translation of X64 software to run on ARM hardware.
For game developers that use Unity, I'm pleased to say that it works surprisingly well on Apple Silicon via Rosetta.
However, it's not as performant as running natively on x86.
But by the time you watch this video, Unity might have a version natively compatible with M1, which I know they're working hard to get out as soon as possible.
Overall, Apple Silicon has really put a boost into many workflows for developers and other professions And eventually even gaming.
And with the m one tests, we're seeing the improvements with just their entry level machines.
The upcoming second and third generation Apple Silicon machines will be even more performant, and I can't wait to see that.
I think it's really gonna help us as developers move to the next level.
And I think it's just gonna lift up the entire industry.
To follow the updates on the new Apple Silicon chips as they relate to us, developers, as well as seeing me conduct these tests that I've been discussing here, consider subscribing to my channel as well.
The link is down below.
I'm gonna wrap it up there.
Thanks to FireShip for hosting me to share this amazing new world that we're about to enter as developers.

Speaker 0: The Central Processing Unit, or CPU, is like the engine in your car or the brain in your skull, and is like a really fancy calculator used to run the applications on your computer. When you write software in a language like JavaScript or Python, you're actually writing a set of instructions that will be execute it as machine code by a CPU, which itself is a carefully crafted piece of metal and silicon that contains billions of tiny transistors or on off switches that represent ones and zeros. To perform mathematical calculations, a CPU will combine multiple transistors together to form logic gates. For example, and will take 2 binary inputs and validate that both are true to produce a true output. It only takes a few basic logic gates to solve really complex computational problems.

Modern chips contain billions of transistors and they can be flipped on and off billions of times per second. The state of the CPU is synchronized by an oscillator known as the clock generator. In general, the more times the clock can pulse per second, the faster the CPU can compute, and is normally measured in gigahertz. Gamers will sometimes overclock their CPUs to gain more performance at the cost of higher temperatures and a lower life expectancy. Now in order to run applications, it interacts with the system memory or RAM in a series of 4 steps known as the machine or instruction cycle.

Step 1 is the fetch phase. Think of a software program as a set of instructions stored in the RAM. The CPU has registers temporarily store the address in memory that it wants to interact with. The program counter starts at 0 and copies that address to the memory address register. Then the control unit sends out a signal to copy the data from that address to the instruction register.

At which point, it needs to figure out how to use this instruction in the decode phase. The control unit parses the actual bits in the instruction. Most importantly, the opt code contains the instruction, like add or subtract, and the operand is the address in memory to perform that operation on. The final execute stage takes the decoded information and passes it as electrical signals to the relevant parts of the CPU. The Arithmetic Logic Unit or ALU, can perform math on the data and then store the results in RAM to change the state of the program.

The cycle is repeated billions of times per second and modern chips, utilize multiple CPU cores to run multiple computations in parallel. That's how a CPU works under the hood, but there's a lot more you should know about processor architectures if you're a developer. And that's why I've invited Alex from the most underrated tech channel on YouTube to break down some more advanced concepts like Apple Silicon and how to run performance benchmarking on your own machine.

Speaker 1: Hi, everybody. My name is Alex and I'm here to take you beyond 100 seconds in your quest to learn about how processor architectures differ And also how those differences affect our productivity as developers. I'll show you what the Apple Silicon chip and a refrigerator have in common, And then I'll share some of my own experiences with using developer tools and build execution on the 1st generation Apple Silicon chip call the M1 Chip as compared to the Intel Chip. 1st and foremost, I just wanna say that my personal productivity as a developer depends less on processors inside my computer and more on how much coffee I had and whether I'm trying to work after a big meal. But aside from human factors, let's dig deeper into why the new Apple Silicon machines have been really kicking up a storm and changing the industry, Software development included.

And spoiler alert, the m one machines have been beating the Intel machines in pretty much every build test I've thrown at it, except a couple. But it's not all roses, so let's talk about some downsides later too. So why is it so darn fast? Test. The first point I wanna discuss is the physicality differences of the new Apple Silicon way versus the old Intel call an AMD way.

This is what Apple silicon and your refrigerator at home have in common. Alright. Imagine for a minute that you wanna make a turkey with cheese sandwich. You go over to the refrigerator and in one place, you have the turkey breast, the cheese, the mayonnaise, the mustard. All those ingredients are right there in one place and you don't have to run around the house to gather them.

You don't have to drive to lots of stores to pick them up and this saves you lots of time and energy. This kind of efficiency can be found in the new Apple Silicon Chips because they aren't just a new processor. Apple Silicon is a collection of many chips that are housed inside one silicon container. And this type of system is known as a system on chip or sock And it's essentially an entire computer on one chip. The main CPU, the GPU, the IO controller, the ML engine, They're all collocated, so when the task is to make an electronic sandwich, so to speak, or in other words, to do some work that involves all these different components, A system on chip is going to be a lot more efficient in terms of energy usage using only a tiny bit of power and at the same time is going to be faster than say a typical machine that has all the components separate.

Intel based machines have a CPU that's a single chip. And memory is located somewhere else on the motherboard. The IO is somewhere else. The individual components might be even more powerful than the ones available at the moment on the latest Apple Silicon based machines, but that comes at a cost since these powerful components are like supermarkets That carry different sandwich ingredients. As a result, when you want a sandwich on an Intel machine, you'll have to drive all over town because one store will have the turkey, another store will have the cheese, yet another store will have the mayonnaise.

Each store might be really good at their own process and have the best ingredients. But each store also takes a lot of power to run, losing out on the efficiency. And since all you really want is just to make a simple sandwich, you're wasting Taking a ton of time and energy picking up the ingredients from all the different stores. Of course, some might say the drawback with come on chip design is that, at least for now, with the current selection of Apple Macs, you won't be able to upgrade or change any of the components. You get what's on the menu and that's it.

But that's not news to most people that are familiar with the Apple ecosystem. Once you accept that idea, you might even see the benefits of having a more efficient design where where all the components are on one chip and they outweigh the cons and still provide better performance than the alternative. Alright. That's enough talk about food. So how does this all affect real world development workflows?

So I've been doing a bunch of developer focused tests on the latest Apple Silicon machines over on my channel as well as comparing them to other machines like the Intel Macs and PC machines too. And in general, the new design has been showing really great promise for my own workflows as a developer, coffee and sandwiches excluded. Now there Are lots of technology stacks that developers use, of course, and I'm trying builds in a few of them. But now, let me share some of the results I've seen with Node and JavaScript tests. And after that, I'll also discuss the tech stacks that have the biggest gains on the new machines and also the stacks that have the biggest losses right now at the moment.

I started off trying out some existing JavaScript tests that are in the browser and then in Node. The browser test consisted of running speedometer, Which is a browser benchmark that measures the responsiveness of web applications. It uses demo web apps to simulate their actions such as adding to do items. You visit the app in the browser of choice. I tried Chrome and Safari for this, and you execute the automated test that runs through a collection of applications built with some of the more popular UI frameworks like Angular, React, Ember, even vanilla JS and jQuery, and a whole bunch more.

And then this test reports the results as a single number when it's done. This number represents the runs per minute and the higher the better. When it was finished, I found that it has significantly more iterations on the m one. Safari had the best results even going off the scale and Chrome did pretty well too. I also ran some JavaScript benchmarks in a node environment and found a pretty CPU intensive algorithm called fan cook redux That's implemented in JavaScript and created for benchmarks game, a website that collects algorithms and tests in different languages.

And while my 16 inch MacBook Pro with the Intel Core I9 Processor did beat the MacBook Air with the M1 Chip, it really didn't do so by a lot. And when you consider the price differences between the machines and the fact that the m one stayed cool throughout the test and that the battery hardly even took a hit on the m one, You might be thinking whether the extra few seconds saved while running this benchmark on the Intel I9 is really worth the money. So running benchmarks is often very telling, But it doesn't necessarily line up with real world scenarios. So that's why I also like to conduct my own tests, whether using my own projects Or other open source projects that are out there and that commenters sent to me. And here's what I found.

I ran a build of the official NativeScript plugins repository, which is project based on NX workspaces. If you're not familiar with NX workspaces, it allows you to scale large JavaScript and other tech stack projects, And you can see the NX quick start right here on this channel. In my test, the build that took about 3 minutes on each machine only differed in build time by tens of seconds. With the M1 MacBook Air beating out the Intel MacBook Pro 2 out of 3 times. So let's talk about what dev stacks benefit the most from the new Apple Silicon chips at this time.

For JavaScript developers, the benefits are already visible. However, if you're building mobile apps for iOS for compiling c plus plus code, then this is where you'll see a 40 to 50% improvement in build times. I ran a few x code builds and swift builds, And I did some c plus plus algorithms and built OpenCV and Webkit. In all those tests, the m one came out on top. So what dev stacks benefit the least?

So far in my own testing, any builds that have to do with running natively built software and building using native tooling has absolutely destroyed intel and speed and battery performance, native being compiled for the Apple Silicon architecture. Even when running some software via Apple's Rosetta, That's the translation layer that allows you to run Intel and AMD based x64 and x86 programs on the new Apple hardware. Even some of those software packages ran better than on Intel. And that's just amazing. But there are workflows that aren't ready yet, in my opinion.

If you are an Android developer, Android Studio And official Android emulators work on Apple Silicon, but they're currently using Rosetta for translations. And while Rosetta is generally pretty good at running x86 targeted code on arm chips, it's not enough for the CPU hungry Android workflows and I found the results to be not very usable at the moment. The latest version of dot net, which is version 5 right now, Isn't fully supported to run on ARM. Simple console applications ran just fine for me, but testing any web work flows like asp.netcore. Doesn't work at all yet.

Now it's expected that by the end of this year, dot net 6 will come out. It's in alpha right now and we'll have full support for Arm. Until then, if you need to develop dot net apps, I suggest using a PC with Windows. Oh, and if you think you can use a virtual Windows machine, I've tested this as well. Parallels is the only vendor that currently supports the m one chip to create a virtual Windows environment, but the issue is that the Windows guest operating system for Arm is still quite immature and needs a lot of work.

Also, Visual Studio 2019, the latest Visual Studio offering from Microsoft, is unfortunately not compatible with ARM at all And in my test is not stable even using the built in Windows translation of X64 software to run on ARM hardware. For game developers that use Unity, I'm pleased to say that it works surprisingly well on Apple Silicon via Rosetta. However, it's not as performant as running natively on x86. But by the time you watch this video, Unity might have a version natively compatible with M1, which I know they're working hard to get out as soon as possible. Overall, Apple Silicon has really put a boost into many workflows for developers and other professions And eventually even gaming.

And with the m one tests, we're seeing the improvements with just their entry level machines. The upcoming second and third generation Apple Silicon machines will be even more performant, and I can't wait to see that. I think it's really gonna help us as developers move to the next level. And I think it's just gonna lift up the entire industry. To follow the updates on the new Apple Silicon chips as they relate to us, developers, as well as seeing me conduct these tests that I've been discussing here, consider subscribing to my channel as well.

The link is down below. I'm gonna wrap it up there. Thanks to FireShip for hosting me to share this amazing new world that we're about to enter as developers.
The Central Processing Unit, or CPU, is like the engine in your car or the brain in your skull, and is like a really fancy calculator used to run the applications on your computer. When you write software in a language like JavaScript or Python, you're actually writing a set of instructions that will be execute it as machine code by a CPU, which itself is a carefully crafted piece of metal and silicon that contains billions of tiny transistors or on off switches that represent ones and zeros. To perform mathematical calculations, a CPU will combine multiple transistors together to form logic gates. For example, and will take 2 binary inputs and validate that both are true to produce a true output. It only takes a few basic logic gates to solve really complex computational problems. Modern chips contain billions of transistors and they can be flipped on and off billions of times per second.
programming
computer science
software development
software
logic
computers
The state of the CPU is synchronized by an oscillator known as the clock generator. In general, the more times the clock can pulse per second, the faster the CPU can compute, and is normally measured in gigahertz.
Gamers will sometimes overclock their CPUs to gain more performance at the cost of higher temperatures and a lower life expectancy. Now in order to run applications, it interacts with the system memory or RAM in a series of 4 steps known as the machine or instruction cycle. Step 1 is the fetch phase. Think of a software program as a set of instructions stored in the RAM. The CPU has registers temporarily store the address in memory that it wants to interact with. The program counter starts at 0 and copies that address to the memory address register.
computer science
video gaming
games
programming
computers
Then the control unit sends out a signal to copy the data from that address to the instruction register. At which point, it needs to figure out how to use this instruction in the decode phase. The control unit parses the actual bits in the instruction.
Most importantly, the opt code contains the instruction, like add or subtract, and the operand is the address in memory to perform that operation on. The final execute stage takes the decoded information and passes it as electrical signals to the relevant parts of the CPU. The Arithmetic Logic Unit or ALU, can perform math on the data and then store the results in RAM to change the state of the program. The cycle is repeated billions of times per second and modern chips, utilize multiple CPU cores to run multiple computations in parallel. That's how a CPU works under the hood, but there's a lot more you should know about processor architectures if you're a developer. And that's why I've invited Alex from the most underrated tech channel on YouTube to break down some more advanced concepts like Apple Silicon and how to run performance benchmarking on your own machine. Hi, everybody. My name is Alex and I'm here to take you beyond 100 seconds in your quest to learn about how processor architectures differ And also how those differences affect our productivity as developers. I'll show you what the Apple Silicon chip and a refrigerator have in common, And then I'll share some of my own experiences with using developer tools and build execution on the 1st generation Apple Silicon chip call the M1 Chip as compared to the Intel Chip. 1st and foremost, I just wanna say that my personal productivity as a developer depends less on processors inside my computer and more on how much coffee I had and whether I'm trying to work after a big meal. But aside from human factors, let's dig deeper into why the new Apple Silicon machines have been really kicking up a storm and changing the industry, Software development included. And spoiler alert, the m one machines have been beating the Intel machines in pretty much every build test I've thrown at it, except a couple. But it's not all roses, so let's talk about some downsides later too. So why is it so darn fast? Test. The first point I wanna discuss is the physicality differences of the new Apple Silicon way versus the old Intel call an AMD way. This is what Apple silicon and your refrigerator at home have in common. Alright. Imagine for a minute that you wanna make a turkey with cheese sandwich. You go over to the refrigerator and in one place, you have the turkey breast, the cheese, the mayonnaise, the mustard. All those ingredients are right there in one place and you don't have to run around the house to gather them. You don't have to drive to lots of stores to pick them up and this saves you lots of time and energy. This kind of efficiency can be found in the new Apple Silicon Chips because they aren't just a new processor. Apple Silicon is a collection of many chips that are housed inside one silicon container. And this type of system is known as a system on chip or sock And it's essentially an entire computer on one chip. The main CPU, the GPU, the IO controller, the ML engine, They're all collocated, so when the task is to make an electronic sandwich, so to speak, or in other words, to do some work that involves all these different components, A system on chip is going to be a lot more efficient in terms of energy usage using only a tiny bit of power and at the same time is going to be faster than say a typical machine that has all the components separate. Intel based machines have a CPU that's a single chip. And memory is located somewhere else on the motherboard. The IO is somewhere else. The individual components might be even more powerful than the ones available at the moment on the latest Apple Silicon based machines, but that comes at a cost since these powerful components are like supermarkets That carry different sandwich ingredients. As a result, when you want a sandwich on an Intel machine, you'll have to drive all over town because one store will have the turkey, another store will have the cheese, yet another store will have the mayonnaise. Each store might be really good at their own process and have the best ingredients. But each store also takes a lot of power to run, losing out on the efficiency. And since all you really want is just to make a simple sandwich, you're wasting Taking a ton of time and energy picking up the ingredients from all the different stores. Of course, some might say the drawback with come on chip design is that, at least for now, with the current selection of Apple Macs, you won't be able to upgrade or change any of the components. You get what's on the menu and that's it. But that's not news to most people that are familiar with the Apple ecosystem. Once you accept that idea, you might even see the benefits of having a more efficient design where where all the components are on one chip and they outweigh the cons and still provide better performance than the alternative. Alright. That's enough talk about food. So how does this all affect real world development workflows? So I've been doing a bunch of developer focused tests on the latest Apple Silicon machines over on my channel as well as comparing them to other machines like the Intel Macs and PC machines too. And in general, the new design has been showing really great promise for my own workflows as a developer, coffee and sandwiches excluded. Now there Are lots of technology stacks that developers use, of course, and I'm trying builds in a few of them. But now, let me share some of the results I've seen with Node and JavaScript tests.
apple
programming
software development
food
computers
computer science
electronics
logic
cooking
ibm
graphic design
sales
customers
science
infrastructure
architecture
restaurants
engineering
industry
systems
And after that, I'll also discuss the tech stacks that have the biggest gains on the new machines and also the stacks that have the biggest losses right now at the moment. I started off trying out some existing JavaScript tests that are in the browser and then in Node. The browser test consisted of running speedometer, Which is a browser benchmark that measures the responsiveness of web applications.
It uses demo web apps to simulate their actions such as adding to do items. You visit the app in the browser of choice. I tried Chrome and Safari for this, and you execute the automated test that runs through a collection of applications built with some of the more popular UI frameworks like Angular, React, Ember, even vanilla JS and jQuery, and a whole bunch more. And then this test reports the results as a single number when it's done. This number represents the runs per minute and the higher the better. When it was finished, I found that it has significantly more iterations on the m one. Safari had the best results even going off the scale and Chrome did pretty well too.
animation
statistics
I also ran some JavaScript benchmarks in a node environment and found a pretty CPU intensive algorithm called fan cook redux That's implemented in JavaScript and created for benchmarks game, a website that collects algorithms and tests in different languages. And while my 16 inch MacBook Pro with the Intel Core I9 Processor did beat the MacBook Air with the M1 Chip, it really didn't do so by a lot.
And when you consider the price differences between the machines and the fact that the m one stayed cool throughout the test and that the battery hardly even took a hit on the m one, You might be thinking whether the extra few seconds saved while running this benchmark on the Intel I9 is really worth the money.
electronics
So running benchmarks is often very telling, But it doesn't necessarily line up with real world scenarios. So that's why I also like to conduct my own tests, whether using my own projects Or other open source projects that are out there and that commenters sent to me. And here's what I found. I ran a build of the official NativeScript plugins repository, which is project based on NX workspaces. If you're not familiar with NX workspaces, it allows you to scale large JavaScript and other tech stack projects, And you can see the NX quick start right here on this channel. In my test, the build that took about 3 minutes on each machine only differed in build time by tens of seconds. With the M1 MacBook Air beating out the Intel MacBook Pro 2 out of 3 times. So let's talk about what dev stacks benefit the most from the new Apple Silicon chips at this time. For JavaScript developers, the benefits are already visible. However, if you're building mobile apps for iOS for compiling c plus plus code, then this is where you'll see a 40 to 50% improvement in build times. I ran a few x code builds and swift builds, And I did some c plus plus algorithms and built OpenCV and Webkit. In all those tests, the m one came out on top.
So what dev stacks benefit the least? So far in my own testing, any builds that have to do with running natively built software and building using native tooling has absolutely destroyed intel and speed and battery performance, native being compiled for the Apple Silicon architecture. Even when running some software via Apple's Rosetta, That's the translation layer that allows you to run Intel and AMD based x64 and x86 programs on the new Apple hardware. Even some of those software packages ran better than on Intel. And that's just amazing. But there are workflows that aren't ready yet, in my opinion.
computers
computer science
apple
software
microsoft
If you are an Android developer, Android Studio And official Android emulators work on Apple Silicon, but they're currently using Rosetta for translations. And while Rosetta is generally pretty good at running x86 targeted code on arm chips, it's not enough for the CPU hungry Android workflows and I found the results to be not very usable at the moment.
phones
The latest version of dot net, which is version 5 right now, Isn't fully supported to run on ARM. Simple console applications ran just fine for me, but testing any web work flows like asp.netcore. Doesn't work at all yet. Now it's expected that by the end of this year, dot net 6 will come out. It's in alpha right now and we'll have full support for Arm. Until then, if you need to develop dot net apps, I suggest using a PC with Windows. Oh, and if you think you can use a virtual Windows machine, I've tested this as well.
Parallels is the only vendor that currently supports the m one chip to create a virtual Windows environment, but the issue is that the Windows guest operating system for Arm is still quite immature and needs a lot of work. Also, Visual Studio 2019, the latest Visual Studio offering from Microsoft, is unfortunately not compatible with ARM at all And in my test is not stable even using the built in Windows translation of X64 software to run on ARM hardware. For game developers that use Unity, I'm pleased to say that it works surprisingly well on Apple Silicon via Rosetta.
ibm
computer science
software
software development
However, it's not as performant as running natively on x86.
But by the time you watch this video, Unity might have a version natively compatible with M1, which I know they're working hard to get out as soon as possible. Overall, Apple Silicon has really put a boost into many workflows for developers and other professions And eventually even gaming. And with the m one tests, we're seeing the improvements with just their entry level machines. The upcoming second and third generation Apple Silicon machines will be even more performant, and I can't wait to see that. I think it's really gonna help us as developers move to the next level. And I think it's just gonna lift up the entire industry. To follow the updates on the new Apple Silicon chips as they relate to us, developers, as well as seeing me conduct these tests that I've been discussing here, consider subscribing to my channel as well. The link is down below. I'm gonna wrap it up there. Thanks to FireShip for hosting me to share this amazing new world that we're about to enter as developers.
apple
computers
blogging
computer science
The Central Processing Unit, or CPU, is like the engine in your car or the brain in your skull, and is like a really fancy calculator used to run the applications on your computer. When you write software in a language like JavaScript or Python, you're actually writing a set of instructions that will be execute it as machine code by a CPU, which itself is a carefully crafted piece of metal and silicon that contains billions of tiny transistors or on off switches that represent ones and zeros. To perform mathematical calculations, a CPU will combine multiple transistors together to form logic gates. For example, and will take 2 binary inputs and validate that both are true to produce a true output. It only takes a few basic logic gates to solve really complex computational problems. Modern chips contain billions of transistors and they can be flipped on and off billions of times per second. The state of the CPU is synchronized by an oscillator known as the clock generator. In general, the more times the clock can pulse per second, the faster the CPU can compute, and is normally measured in gigahertz. Gamers will sometimes overclock their CPUs to gain more performance at the cost of higher temperatures and a lower life expectancy. Now in order to run applications, it interacts with the system memory or RAM in a series of 4 steps known as the machine or instruction cycle. Step 1 is the fetch phase. Think of a software program as a set of instructions stored in the RAM. The CPU has registers temporarily store the address in memory that it wants to interact with. The program counter starts at 0 and copies that address to the memory address register. Then the control unit sends out a signal to copy the data from that address to the instruction register. At which point, it needs to figure out how to use this instruction in the decode phase. The control unit parses the actual bits in the instruction. Most importantly, the opt code contains the instruction, like add or subtract, and the operand is the address in memory to perform that operation on. The final execute stage takes the decoded information and passes it as electrical signals to the relevant parts of the CPU. The Arithmetic Logic Unit or ALU, can perform math on the data and then store the results in RAM to change the state of the program. The cycle is repeated billions of times per second and modern chips, utilize multiple CPU cores to run multiple computations in parallel. That's how a CPU works under the hood, but there's a lot more you should know about processor architectures if you're a developer. And that's why I've invited Alex from the most underrated tech channel on YouTube to break down some more advanced concepts like Apple Silicon and how to run performance benchmarking on your own machine. Hi, everybody. My name is Alex and I'm here to take you beyond 100 seconds in your quest to learn about how processor architectures differ And also how those differences affect our productivity as developers. I'll show you what the Apple Silicon chip and a refrigerator have in common, And then I'll share some of my own experiences with using developer tools and build execution on the 1st generation Apple Silicon chip call the M1 Chip as compared to the Intel Chip. 1st and foremost, I just wanna say that my personal productivity as a developer depends less on processors inside my computer and more on how much coffee I had and whether I'm trying to work after a big meal. But aside from human factors, let's dig deeper into why the new Apple Silicon machines have been really kicking up a storm and changing the industry, Software development included. And spoiler alert, the m one machines have been beating the Intel machines in pretty much every build test I've thrown at it, except a couple. But it's not all roses, so let's talk about some downsides later too. So why is it so darn fast? Test. The first point I wanna discuss is the physicality differences of the new Apple Silicon way versus the old Intel call an AMD way. This is what Apple silicon and your refrigerator at home have in common. Alright. Imagine for a minute that you wanna make a turkey with cheese sandwich. You go over to the refrigerator and in one place, you have the turkey breast, the cheese, the mayonnaise, the mustard. All those ingredients are right there in one place and you don't have to run around the house to gather them. You don't have to drive to lots of stores to pick them up and this saves you lots of time and energy. This kind of efficiency can be found in the new Apple Silicon Chips because they aren't just a new processor. Apple Silicon is a collection of many chips that are housed inside one silicon container. And this type of system is known as a system on chip or sock And it's essentially an entire computer on one chip. The main CPU, the GPU, the IO controller, the ML engine, They're all collocated, so when the task is to make an electronic sandwich, so to speak, or in other words, to do some work that involves all these different components, A system on chip is going to be a lot more efficient in terms of energy usage using only a tiny bit of power and at the same time is going to be faster than say a typical machine that has all the components separate. Intel based machines have a CPU that's a single chip. And memory is located somewhere else on the motherboard. The IO is somewhere else. The individual components might be even more powerful than the ones available at the moment on the latest Apple Silicon based machines, but that comes at a cost since these powerful components are like supermarkets That carry different sandwich ingredients. As a result, when you want a sandwich on an Intel machine, you'll have to drive all over town because one store will have the turkey, another store will have the cheese, yet another store will have the mayonnaise. Each store might be really good at their own process and have the best ingredients. But each store also takes a lot of power to run, losing out on the efficiency. And since all you really want is just to make a simple sandwich, you're wasting Taking a ton of time and energy picking up the ingredients from all the different stores. Of course, some might say the drawback with come on chip design is that, at least for now, with the current selection of Apple Macs, you won't be able to upgrade or change any of the components. You get what's on the menu and that's it. But that's not news to most people that are familiar with the Apple ecosystem. Once you accept that idea, you might even see the benefits of having a more efficient design where where all the components are on one chip and they outweigh the cons and still provide better performance than the alternative. Alright. That's enough talk about food. So how does this all affect real world development workflows? So I've been doing a bunch of developer focused tests on the latest Apple Silicon machines over on my channel as well as comparing them to other machines like the Intel Macs and PC machines too. And in general, the new design has been showing really great promise for my own workflows as a developer, coffee and sandwiches excluded. Now there Are lots of technology stacks that developers use, of course, and I'm trying builds in a few of them. But now, let me share some of the results I've seen with Node and JavaScript tests. And after that, I'll also discuss the tech stacks that have the biggest gains on the new machines and also the stacks that have the biggest losses right now at the moment. I started off trying out some existing JavaScript tests that are in the browser and then in Node. The browser test consisted of running speedometer, Which is a browser benchmark that measures the responsiveness of web applications. It uses demo web apps to simulate their actions such as adding to do items. You visit the app in the browser of choice. I tried Chrome and Safari for this, and you execute the automated test that runs through a collection of applications built with some of the more popular UI frameworks like Angular, React, Ember, even vanilla JS and jQuery, and a whole bunch more. And then this test reports the results as a single number when it's done. This number represents the runs per minute and the higher the better. When it was finished, I found that it has significantly more iterations on the m one. Safari had the best results even going off the scale and Chrome did pretty well too. I also ran some JavaScript benchmarks in a node environment and found a pretty CPU intensive algorithm called fan cook redux That's implemented in JavaScript and created for benchmarks game, a website that collects algorithms and tests in different languages. And while my 16 inch MacBook Pro with the Intel Core I9 Processor did beat the MacBook Air with the M1 Chip, it really didn't do so by a lot. And when you consider the price differences between the machines and the fact that the m one stayed cool throughout the test and that the battery hardly even took a hit on the m one, You might be thinking whether the extra few seconds saved while running this benchmark on the Intel I9 is really worth the money. So running benchmarks is often very telling, But it doesn't necessarily line up with real world scenarios. So that's why I also like to conduct my own tests, whether using my own projects Or other open source projects that are out there and that commenters sent to me. And here's what I found. I ran a build of the official NativeScript plugins repository, which is project based on NX workspaces. If you're not familiar with NX workspaces, it allows you to scale large JavaScript and other tech stack projects, And you can see the NX quick start right here on this channel. In my test, the build that took about 3 minutes on each machine only differed in build time by tens of seconds. With the M1 MacBook Air beating out the Intel MacBook Pro 2 out of 3 times. So let's talk about what dev stacks benefit the most from the new Apple Silicon chips at this time. For JavaScript developers, the benefits are already visible. However, if you're building mobile apps for iOS for compiling c plus plus code, then this is where you'll see a 40 to 50% improvement in build times. I ran a few x code builds and swift builds, And I did some c plus plus algorithms and built OpenCV and Webkit. In all those tests, the m one came out on top. So what dev stacks benefit the least? So far in my own testing, any builds that have to do with running natively built software and building using native tooling has absolutely destroyed intel and speed and battery performance, native being compiled for the Apple Silicon architecture. Even when running some software via Apple's Rosetta, That's the translation layer that allows you to run Intel and AMD based x64 and x86 programs on the new Apple hardware. Even some of those software packages ran better than on Intel. And that's just amazing. But there are workflows that aren't ready yet, in my opinion. If you are an Android developer, Android Studio And official Android emulators work on Apple Silicon, but they're currently using Rosetta for translations. And while Rosetta is generally pretty good at running x86 targeted code on arm chips, it's not enough for the CPU hungry Android workflows and I found the results to be not very usable at the moment. The latest version of dot net, which is version 5 right now, Isn't fully supported to run on ARM. Simple console applications ran just fine for me, but testing any web work flows like asp.netcore. Doesn't work at all yet. Now it's expected that by the end of this year, dot net 6 will come out. It's in alpha right now and we'll have full support for Arm. Until then, if you need to develop dot net apps, I suggest using a PC with Windows. Oh, and if you think you can use a virtual Windows machine, I've tested this as well. Parallels is the only vendor that currently supports the m one chip to create a virtual Windows environment, but the issue is that the Windows guest operating system for Arm is still quite immature and needs a lot of work. Also, Visual Studio 2019, the latest Visual Studio offering from Microsoft, is unfortunately not compatible with ARM at all And in my test is not stable even using the built in Windows translation of X64 software to run on ARM hardware. For game developers that use Unity, I'm pleased to say that it works surprisingly well on Apple Silicon via Rosetta. However, it's not as performant as running natively on x86. But by the time you watch this video, Unity might have a version natively compatible with M1, which I know they're working hard to get out as soon as possible. Overall, Apple Silicon has really put a boost into many workflows for developers and other professions And eventually even gaming. And with the m one tests, we're seeing the improvements with just their entry level machines. The upcoming second and third generation Apple Silicon machines will be even more performant, and I can't wait to see that. I think it's really gonna help us as developers move to the next level. And I think it's just gonna lift up the entire industry. To follow the updates on the new Apple Silicon chips as they relate to us, developers, as well as seeing me conduct these tests that I've been discussing here, consider subscribing to my channel as well. The link is down below. I'm gonna wrap it up there. Thanks to FireShip for hosting me to share this amazing new world that we're about to enter as developers.
The
the
Central
central
Processing
processing
Unit,
unit
or
or
CPU,
cpu
is
is
like
like
the
the
engine
engine
in
in
your
your
car
car
or
or
the
the
brain
brain
in
in
your
your
skull,
skull
and
and
is
is
like
like
a
a
really
really
fancy
fancy
calculator
calculator
used
used
to
to
run
run
the
the
applications
applications
on
on
your
your
computer.
computer
When
when
you
you
write
write
software
software
in
in
a
a
language
language
like
like
JavaScript
javascript
or
or
Python,
python
you're
you're
actually
actually
writing
writing
a
a
set
set
of
of
instructions
instructions
that
that
will
will
be
be
execute
execute
it
it
as
as
machine
machine
code
code
by
by
a
a
CPU,
cpu
which
which
itself
itself
is
is
a
a
carefully
carefully
crafted
crafted
piece
piece
of
of
metal
metal
and
and
silicon
silicon
that
that
contains
contains
billions
billions
of
of
tiny
tiny
transistors
transistors
or
or
on
on
off
off
switches
switches
that
that
represent
represent
ones
ones
and
and
zeros.
zeros
To
to
perform
perform
mathematical
mathematical
calculations,
calculations
a
a
CPU
cpu
will
will
combine
combine
multiple
multiple
transistors
transistors
together
together
to
to
form
form
logic
logic
gates.
gates
For
for
example,
example
and
and
will
will
take
take
2
2
binary
binary
inputs
inputs
and
and
validate
validate
that
that
both
both
are
are
true
true
to
to
produce
produce
a
a
true
true
output.
output
It
it
only
only
takes
takes
a
a
few
few
basic
basic
logic
logic
gates
gates
to
to
solve
solve
really
really
complex
complex
computational
computational
problems.
problems
Modern
modern
chips
chips
contain
contain
billions
billions
of
of
transistors
transistors
and
and
they
they
can
can
be
be
flipped
flipped
on
on
and
and
off
off
billions
billions
of
of
times
times
per
per
second.
second
The
the
state
state
of
of
the
the
CPU
cpu
is
is
synchronized
synchronized
by
by
an
an
oscillator
oscillator
known
known
as
as
the
the
clock
clock
generator.
generator
In
in
general,
general
the
the
more
more
times
times
the
the
clock
clock
can
can
pulse
pulse
per
per
second,
second
the
the
faster
faster
the
the
CPU
cpu
can
can
compute,
compute
and
and
is
is
normally
normally
measured
measured
in
in
gigahertz.
gigahertz
Gamers
gamers
will
will
sometimes
sometimes
overclock
overclock
their
their
CPUs
cpus
to
to
gain
gain
more
more
performance
performance
at
at
the
the
cost
cost
of
of
higher
higher
temperatures
temperatures
and
and
a
a
lower
lower
life
life
expectancy.
expectancy
Now
now
in
in
order
order
to
to
run
run
applications,
applications
it
it
interacts
interacts
with
with
the
the
system
system
memory
memory
or
or
RAM
ram
in
in
a
a
series
series
of
of
4
4
steps
steps
known
known
as
as
the
the
machine
machine
or
or
instruction
instruction
cycle.
cycle
Step
step
1
1
is
is
the
the
fetch
fetch
phase.
phase
Think
think
of
of
a
a
software
software
program
program
as
as
a
a
set
set
of
of
instructions
instructions
stored
stored
in
in
the
the
RAM.
ram
The
the
CPU
cpu
has
has
registers
registers
temporarily
temporarily
store
store
the
the
address
address
in
in
memory
memory
that
that
it
it
wants
wants
to
to
interact
interact
with.
with
The
the
program
program
counter
counter
starts
starts
at
at
0
0
and
and
copies
copies
that
that
address
address
to
to
the
the
memory
memory
address
address
register.
register
Then
then
the
the
control
control
unit
unit
sends
sends
out
out
a
a
signal
signal
to
to
copy
copy
the
the
data
data
from
from
that
that
address
address
to
to
the
the
instruction
instruction
register.
register
At
at
which
which
point,
point
it
it
needs
needs
to
to
figure
figure
out
out
how
how
to
to
use
use
this
this
instruction
instruction
in
in
the
the
decode
decode
phase.
phase
The
the
control
control
unit
unit
parses
parses
the
the
actual
actual
bits
bits
in
in
the
the
instruction.
instruction
Most
most
importantly,
importantly
the
the
opt
opt
code
code
contains
contains
the
the
instruction,
instruction
like
like
add
add
or
or
subtract,
subtract
and
and
the
the
operand
operand
is
is
the
the
address
address
in
in
memory
memory
to
to
perform
perform
that
that
operation
operation
on.
on
The
the
final
final
execute
execute
stage
stage
takes
takes
the
the
decoded
decoded
information
information
and
and
passes
passes
it
it
as
as
electrical
electrical
signals
signals
to
to
the
the
relevant
relevant
parts
parts
of
of
the
the
CPU.
cpu
The
the
Arithmetic
arithmetic
Logic
logic
Unit
unit
or
or
ALU,
alu
can
can
perform
perform
math
math
on
on
the
the
data
data
and
and
then
then
store
store
the
the
results
results
in
in
RAM
ram
to
to
change
change
the
the
state
state
of
of
the
the
program.
program
The
the
cycle
cycle
is
is
repeated
repeated
billions
billions
of
of
times
times
per
per
second
second
and
and
modern
modern
chips,
chips
utilize
utilize
multiple
multiple
CPU
cpu
cores
cores
to
to
run
run
multiple
multiple
computations
computations
in
in
parallel.
parallel
That's
that's
how
how
a
a
CPU
cpu
works
works
under
under
the
the
hood,
hood
but
but
there's
there's
a
a
lot
lot
more
more
you
you
should
should
know
know
about
about
processor
processor
architectures
architectures
if
if
you're
you're
a
a
developer.
developer
And
and
that's
that's
why
why
I've
i've
invited
invited
Alex
alex
from
from
the
the
most
most
underrated
underrated
tech
tech
channel
channel
on
on
YouTube
youtube
to
to
break
break
down
down
some
some
more
more
advanced
advanced
concepts
concepts
like
like
Apple
apple
Silicon
silicon
and
and
how
how
to
to
run
run
performance
performance
benchmarking
benchmarking
on
on
your
your
own
own
machine.
machine
Hi,
hi
everybody.
everybody
My
my
name
name
is
is
Alex
alex
and
and
I'm
i'm
here
here
to
to
take
take
you
you
beyond
beyond
100
100
seconds
seconds
in
in
your
your
quest
quest
to
to
learn
learn
about
about
how
how
processor
processor
architectures
architectures
differ
differ
And
and
also
also
how
how
those
those
differences
differences
affect
affect
our
our
productivity
productivity
as
as
developers.
developers
I'll
i'll
show
show
you
you
what
what
the
the
Apple
apple
Silicon
silicon
chip
chip
and
and
a
a
refrigerator
refrigerator
have
have
in
in
common,
common
And
and
then
then
I'll
i'll
share
share
some
some
of
of
my
my
own
own
experiences
experiences
with
with
using
using
developer
developer
tools
tools
and
and
build
build
execution
execution
on
on
the
the
1st
1st
generation
generation
Apple
apple
Silicon
silicon
chip
chip
call
call
the
the
M1
m1
Chip
chip
as
as
compared
compared
to
to
the
the
Intel
intel
Chip.
chip
1st
1st
and
and
foremost,
foremost
I
i
just
just
wanna
wanna
say
say
that
that
my
my
personal
personal
productivity
productivity
as
as
a
a
developer
developer
depends
depends
less
less
on
on
processors
processors
inside
inside
my
my
computer
computer
and
and
more
more
on
on
how
how
much
much
coffee
coffee
I
i
had
had
and
and
whether
whether
I'm
i'm
trying
trying
to
to
work
work
after
after
a
a
big
big
meal.
meal
But
but
aside
aside
from
from
human
human
factors,
factors
let's
let's
dig
dig
deeper
deeper
into
into
why
why
the
the
new
new
Apple
apple
Silicon
silicon
machines
machines
have
have
been
been
really
really
kicking
kicking
up
up
a
a
storm
storm
and
and
changing
changing
the
the
industry,
industry
Software
software
development
development
included.
included
And
and
spoiler
spoiler
alert,
alert
the
the
m
m
one
one
machines
machines
have
have
been
been
beating
beating
the
the
Intel
intel
machines
machines
in
in
pretty
pretty
much
much
every
every
build
build
test
test
I've
i've
thrown
thrown
at
at
it,
it
except
except
a
a
couple.
couple
But
but
it's
it's
not
not
all
all
roses,
roses
so
so
let's
let's
talk
talk
about
about
some
some
downsides
downsides
later
later
too.
too
So
so
why
why
is
is
it
it
so
so
darn
darn
fast?
fast
Test.
test
The
the
first
first
point
point
I
i
wanna
wanna
discuss
discuss
is
is
the
the
physicality
physicality
differences
differences
of
of
the
the
new
new
Apple
apple
Silicon
silicon
way
way
versus
versus
the
the
old
old
Intel
intel
call
call
an
an
AMD
amd
way.
way
This
this
is
is
what
what
Apple
apple
silicon
silicon
and
and
your
your
refrigerator
refrigerator
at
at
home
home
have
have
in
in
common.
common
Alright.
alright
Imagine
imagine
for
for
a
a
minute
minute
that
that
you
you
wanna
wanna
make
make
a
a
turkey
turkey
with
with
cheese
cheese
sandwich.
sandwich
You
you
go
go
over
over
to
to
the
the
refrigerator
refrigerator
and
and
in
in
one
one
place,
place
you
you
have
have
the
the
turkey
turkey
breast,
breast
the
the
cheese,
cheese
the
the
mayonnaise,
mayonnaise
the
the
mustard.
mustard
All
all
those
those
ingredients
ingredients
are
are
right
right
there
there
in
in
one
one
place
place
and
and
you
you
don't
don't
have
have
to
to
run
run
around
around
the
the
house
house
to
to
gather
gather
them.
them
You
you
don't
don't
have
have
to
to
drive
drive
to
to
lots
lots
of
of
stores
stores
to
to
pick
pick
them
them
up
up
and
and
this
this
saves
saves
you
you
lots
lots
of
of
time
time
and
and
energy.
energy
This
this
kind
kind
of
of
efficiency
efficiency
can
can
be
be
found
found
in
in
the
the
new
new
Apple
apple
Silicon
silicon
Chips
chips
because
because
they
they
aren't
aren't
just
just
a
a
new
new
processor.
processor
Apple
apple
Silicon
silicon
is
is
a
a
collection
collection
of
of
many
many
chips
chips
that
that
are
are
housed
housed
inside
inside
one
one
silicon
silicon
container.
container
And
and
this
this
type
type
of
of
system
system
is
is
known
known
as
as
a
a
system
system
on
on
chip
chip
or
or
sock
sock
And
and
it's
it's
essentially
essentially
an
an
entire
entire
computer
computer
on
on
one
one
chip.
chip
The
the
main
main
CPU,
cpu
the
the
GPU,
gpu
the
the
IO
io
controller,
controller
the
the
ML
ml
engine,
engine
They're
they're
all
all
collocated,
collocated
so
so
when
when
the
the
task
task
is
is
to
to
make
make
an
an
electronic
electronic
sandwich,
sandwich
so
so
to
to
speak,
speak
or
or
in
in
other
other
words,
words
to
to
do
do
some
some
work
work
that
that
involves
involves
all
all
these
these
different
different
components,
components
A
a
system
system
on
on
chip
chip
is
is
going
going
to
to
be
be
a
a
lot
lot
more
more
efficient
efficient
in
in
terms
terms
of
of
energy
energy
usage
usage
using
using
only
only
a
a
tiny
tiny
bit
bit
of
of
power
power
and
and
at
at
the
the
same
same
time
time
is
is
going
going
to
to
be
be
faster
faster
than
than
say
say
a
a
typical
typical
machine
machine
that
that
has
has
all
all
the
the
components
components
separate.
separate
Intel
intel
based
based
machines
machines
have
have
a
a
CPU
cpu
that's
that's
a
a
single
single
chip.
chip
And
and
memory
memory
is
is
located
located
somewhere
somewhere
else
else
on
on
the
the
motherboard.
motherboard
The
the
IO
io
is
is
somewhere
somewhere
else.
else
The
the
individual
individual
components
components
might
might
be
be
even
even
more
more
powerful
powerful
than
than
the
the
ones
ones
available
available
at
at
the
the
moment
moment
on
on
the
the
latest
latest
Apple
apple
Silicon
silicon
based
based
machines,
machines
but
but
that
that
comes
comes
at
at
a
a
cost
cost
since
since
these
these
powerful
powerful
components
components
are
are
like
like
supermarkets
supermarkets
That
that
carry
carry
different
different
sandwich
sandwich
ingredients.
ingredients
As
as
a
a
result,
result
when
when
you
you
want
want
a
a
sandwich
sandwich
on
on
an
an
Intel
intel
machine,
machine
you'll
you'll
have
have
to
to
drive
drive
all
all
over
over
town
town
because
because
one
one
store
store
will
will
have
have
the
the
turkey,
turkey
another
another
store
store
will
will
have
have
the
the
cheese,
cheese
yet
yet
another
another
store
store
will
will
have
have
the
the
mayonnaise.
mayonnaise
Each
each
store
store
might
might
be
be
really
really
good
good
at
at
their
their
own
own
process
process
and
and
have
have
the
the
best
best
ingredients.
ingredients
But
but
each
each
store
store
also
also
takes
takes
a
a
lot
lot
of
of
power
power
to
to
run,
run
losing
losing
out
out
on
on
the
the
efficiency.
efficiency
And
and
since
since
all
all
you
you
really
really
want
want
is
is
just
just
to
to
make
make
a
a
simple
simple
sandwich,
sandwich
you're
you're
wasting
wasting
Taking
taking
a
a
ton
ton
of
of
time
time
and
and
energy
energy
picking
picking
up
up
the
the
ingredients
ingredients
from
from
all
all
the
the
different
different
stores.
stores
Of
of
course,
course
some
some
might
might
say
say
the
the
drawback
drawback
with
with
come
come
on
on
chip
chip
design
design
is
is
that,
that
at
at
least
least
for
for
now,
now
with
with
the
the
current
current
selection
selection
of
of
Apple
apple
Macs,
macs
you
you
won't
won't
be
be
able
able
to
to
upgrade
upgrade
or
or
change
change
any
any
of
of
the
the
components.
components
You
you
get
get
what's
what's
on
on
the
the
menu
menu
and
and
that's
that's
it.
it
But
but
that's
that's
not
not
news
news
to
to
most
most
people
people
that
that
are
are
familiar
familiar
with
with
the
the
Apple
apple
ecosystem.
ecosystem
Once
once
you
you
accept
accept
that
that
idea,
idea
you
you
might
might
even
even
see
see
the
the
benefits
benefits
of
of
having
having
a
a
more
more
efficient
efficient
design
design
where
where
where
where
all
all
the
the
components
components
are
are
on
on
one
one
chip
chip
and
and
they
they
outweigh
outweigh
the
the
cons
cons
and
and
still
still
provide
provide
better
better
performance
performance
than
than
the
the
alternative.
alternative
Alright.
alright
That's
that's
enough
enough
talk
talk
about
about
food.
food
So
so
how
how
does
does
this
this
all
all
affect
affect
real
real
world
world
development
development
workflows?
workflows
So
so
I've
i've
been
been
doing
doing
a
a
bunch
bunch
of
of
developer
developer
focused
focused
tests
tests
on
on
the
the
latest
latest
Apple
apple
Silicon
silicon
machines
machines
over
over
on
on
my
my
channel
channel
as
as
well
well
as
as
comparing
comparing
them
them
to
to
other
other
machines
machines
like
like
the
the
Intel
intel
Macs
macs
and
and
PC
pc
machines
machines
too.
too
And
and
in
in
general,
general
the
the
new
new
design
design
has
has
been
been
showing
showing
really
really
great
great
promise
promise
for
for
my
my
own
own
workflows
workflows
as
as
a
a
developer,
developer
coffee
coffee
and
and
sandwiches
sandwiches
excluded.
excluded
Now
now
there
there
Are
are
lots
lots
of
of
technology
technology
stacks
stacks
that
that
developers
developers
use,
use
of
of
course,
course
and
and
I'm
i'm
trying
trying
builds
builds
in
in
a
a
few
few
of
of
them.
them
But
but
now,
now
let
let
me
me
share
share
some
some
of
of
the
the
results
results
I've
i've
seen
seen
with
with
Node
node
and
and
JavaScript
javascript
tests.
tests
And
and
after
after
that,
that
I'll
i'll
also
also
discuss
discuss
the
the
tech
tech
stacks
stacks
that
that
have
have
the
the
biggest
biggest
gains
gains
on
on
the
the
new
new
machines
machines
and
and
also
also
the
the
stacks
stacks
that
that
have
have
the
the
biggest
biggest
losses
losses
right
right
now
now
at
at
the
the
moment.
moment
I
i
started
started
off
off
trying
trying
out
out
some
some
existing
existing
JavaScript
javascript
tests
tests
that
that
are
are
in
in
the
the
browser
browser
and
and
then
then
in
in
Node.
node
The
the
browser
browser
test
test
consisted
consisted
of
of
running
running
speedometer,
speedometer
Which
which
is
is
a
a
browser
browser
benchmark
benchmark
that
that
measures
measures
the
the
responsiveness
responsiveness
of
of
web
web
applications.
applications
It
it
uses
uses
demo
demo
web
web
apps
apps
to
to
simulate
simulate
their
their
actions
actions
such
such
as
as
adding
adding
to
to
do
do
items.
items
You
you
visit
visit
the
the
app
app
in
in
the
the
browser
browser
of
of
choice.
choice
I
i
tried
tried
Chrome
chrome
and
and
Safari
safari
for
for
this,
this
and
and
you
you
execute
execute
the
the
automated
automated
test
test
that
that
runs
runs
through
through
a
a
collection
collection
of
of
applications
applications
built
built
with
with
some
some
of
of
the
the
more
more
popular
popular
UI
ui
frameworks
frameworks
like
like
Angular,
angular
React,
react
Ember,
ember
even
even
vanilla
vanilla
JS
js
and
and
jQuery,
jquery
and
and
a
a
whole
whole
bunch
bunch
more.
more
And
and
then
then
this
this
test
test
reports
reports
the
the
results
results
as
as
a
a
single
single
number
number
when
when
it's
it's
done.
done
This
this
number
number
represents
represents
the
the
runs
runs
per
per
minute
minute
and
and
the
the
higher
higher
the
the
better.
better
When
when
it
it
was
was
finished,
finished
I
i
found
found
that
that
it
it
has
has
significantly
significantly
more
more
iterations
iterations
on
on
the
the
m
m
one.
one
Safari
safari
had
had
the
the
best
best
results
results
even
even
going
going
off
off
the
the
scale
scale
and
and
Chrome
chrome
did
did
pretty
pretty
well
well
too.
too
I
i
also
also
ran
ran
some
some
JavaScript
javascript
benchmarks
benchmarks
in
in
a
a
node
node
environment
environment
and
and
found
found
a
a
pretty
pretty
CPU
cpu
intensive
intensive
algorithm
algorithm
called
called
fan
fan
cook
cook
redux
redux
That's
that's
implemented
implemented
in
in
JavaScript
javascript
and
and
created
created
for
for
benchmarks
benchmarks
game,
game
a
a
website
website
that
that
collects
collects
algorithms
algorithms
and
and
tests
tests
in
in
different
different
languages.
languages
And
and
while
while
my
my
16
16
inch
inch
MacBook
macbook
Pro
pro
with
with
the
the
Intel
intel
Core
core
I9
i9
Processor
processor
did
did
beat
beat
the
the
MacBook
macbook
Air
air
with
with
the
the
M1
m1
Chip,
chip
it
it
really
really
didn't
didn't
do
do
so
so
by
by
a
a
lot.
lot
And
and
when
when
you
you
consider
consider
the
the
price
price
differences
differences
between
between
the
the
machines
machines
and
and
the
the
fact
fact
that
that
the
the
m
m
one
one
stayed
stayed
cool
cool
throughout
throughout
the
the
test
test
and
and
that
that
the
the
battery
battery
hardly
hardly
even
even
took
took
a
a
hit
hit
on
on
the
the
m
m
one,
one
You
you
might
might
be
be
thinking
thinking
whether
whether
the
the
extra
extra
few
few
seconds
seconds
saved
saved
while
while
running
running
this
this
benchmark
benchmark
on
on
the
the
Intel
intel
I9
i9
is
is
really
really
worth
worth
the
the
money.
money
So
so
running
running
benchmarks
benchmarks
is
is
often
often
very
very
telling,
telling
But
but
it
it
doesn't
doesn't
necessarily
necessarily
line
line
up
up
with
with
real
real
world
world
scenarios.
scenarios
So
so
that's
that's
why
why
I
i
also
also
like
like
to
to
conduct
conduct
my
my
own
own
tests,
tests
whether
whether
using
using
my
my
own
own
projects
projects
Or
or
other
other
open
open
source
source
projects
projects
that
that
are
are
out
out
there
there
and
and
that
that
commenters
commenters
sent
sent
to
to
me.
me
And
and
here's
here's
what
what
I
i
found.
found
I
i
ran
ran
a
a
build
build
of
of
the
the
official
official
NativeScript
nativescript
plugins
plugins
repository,
repository
which
which
is
is
project
project
based
based
on
on
NX
nx
workspaces.
workspaces
If
if
you're
you're
not
not
familiar
familiar
with
with
NX
nx
workspaces,
workspaces
it
it
allows
allows
you
you
to
to
scale
scale
large
large
JavaScript
javascript
and
and
other
other
tech
tech
stack
stack
projects,
projects
And
and
you
you
can
can
see
see
the
the
NX
nx
quick
quick
start
start
right
right
here
here
on
on
this
this
channel.
channel
In
in
my
my
test,
test
the
the
build
build
that
that
took
took
about
about
3
3
minutes
minutes
on
on
each
each
machine
machine
only
only
differed
differed
in
in
build
build
time
time
by
by
tens
tens
of
of
seconds.
seconds
With
with
the
the
M1
m1
MacBook
macbook
Air
air
beating
beating
out
out
the
the
Intel
intel
MacBook
macbook
Pro
pro
2
2
out
out
of
of
3
3
times.
times
So
so
let's
let's
talk
talk
about
about
what
what
dev
dev
stacks
stacks
benefit
benefit
the
the
most
most
from
from
the
the
new
new
Apple
apple
Silicon
silicon
chips
chips
at
at
this
this
time.
time
For
for
JavaScript
javascript
developers,
developers
the
the
benefits
benefits
are
are
already
already
visible.
visible
However,
however
if
if
you're
you're
building
building
mobile
mobile
apps
apps
for
for
iOS
ios
for
for
compiling
compiling
c
c
plus
plus
plus
plus
code,
code
then
then
this
this
is
is
where
where
you'll
you'll
see
see
a
a
40
40
to
to
50%
50%
improvement
improvement
in
in
build
build
times.
times
I
i
ran
ran
a
a
few
few
x
x
code
code
builds
builds
and
and
swift
swift
builds,
builds
And
and
I
i
did
did
some
some
c
c
plus
plus
plus
plus
algorithms
algorithms
and
and
built
built
OpenCV
opencv
and
and
Webkit.
webkit
In
in
all
all
those
those
tests,
tests
the
the
m
m
one
one
came
came
out
out
on
on
top.
top
So
so
what
what
dev
dev
stacks
stacks
benefit
benefit
the
the
least?
least
So
so
far
far
in
in
my
my
own
own
testing,
testing
any
any
builds
builds
that
that
have
have
to
to
do
do
with
with
running
running
natively
natively
built
built
software
software
and
and
building
building
using
using
native
native
tooling
tooling
has
has
absolutely
absolutely
destroyed
destroyed
intel
intel
and
and
speed
speed
and
and
battery
battery
performance,
performance
native
native
being
being
compiled
compiled
for
for
the
the
Apple
apple
Silicon
silicon
architecture.
architecture
Even
even
when
when
running
running
some
some
software
software
via
via
Apple's
apple's
Rosetta,
rosetta
That's
that's
the
the
translation
translation
layer
layer
that
that
allows
allows
you
you
to
to
run
run
Intel
intel
and
and
AMD
amd
based
based
x64
x64
and
and
x86
x86
programs
programs
on
on
the
the
new
new
Apple
apple
hardware.
hardware
Even
even
some
some
of
of
those
those
software
software
packages
packages
ran
ran
better
better
than
than
on
on
Intel.
intel
And
and
that's
that's
just
just
amazing.
amazing
But
but
there
there
are
are
workflows
workflows
that
that
aren't
aren't
ready
ready
yet,
yet
in
in
my
my
opinion.
opinion
If
if
you
you
are
are
an
an
Android
android
developer,
developer
Android
android
Studio
studio
And
and
official
official
Android
android
emulators
emulators
work
work
on
on
Apple
apple
Silicon,
silicon
but
but
they're
they're
currently
currently
using
using
Rosetta
rosetta
for
for
translations.
translations
And
and
while
while
Rosetta
rosetta
is
is
generally
generally
pretty
pretty
good
good
at
at
running
running
x86
x86
targeted
targeted
code
code
on
on
arm
arm
chips,
chips
it's
it's
not
not
enough
enough
for
for
the
the
CPU
cpu
hungry
hungry
Android
android
workflows
workflows
and
and
I
i
found
found
the
the
results
results
to
to
be
be
not
not
very
very
usable
usable
at
at
the
the
moment.
moment
The
the
latest
latest
version
version
of
of
dot
dot
net,
net
which
which
is
is
version
version
5
5
right
right
now,
now
Isn't
isn't
fully
fully
supported
supported
to
to
run
run
on
on
ARM.
arm
Simple
simple
console
console
applications
applications
ran
ran
just
just
fine
fine
for
for
me,
me
but
but
testing
testing
any
any
web
web
work
work
flows
flows
like
like
asp.netcore.
asp.netcore
Doesn't
doesn't
work
work
at
at
all
all
yet.
yet
Now
now
it's
it's
expected
expected
that
that
by
by
the
the
end
end
of
of
this
this
year,
year
dot
dot
net
net
6
6
will
will
come
come
out.
out
It's
it's
in
in
alpha
alpha
right
right
now
now
and
and
we'll
we'll
have
have
full
full
support
support
for
for
Arm.
arm
Until
until
then,
then
if
if
you
you
need
need
to
to
develop
develop
dot
dot
net
net
apps,
apps
I
i
suggest
suggest
using
using
a
a
PC
pc
with
with
Windows.
windows
Oh,
oh
and
and
if
if
you
you
think
think
you
you
can
can
use
use
a
a
virtual
virtual
Windows
windows
machine,
machine
I've
i've
tested
tested
this
this
as
as
well.
well
Parallels
parallels
is
is
the
the
only
only
vendor
vendor
that
that
currently
currently
supports
supports
the
the
m
m
one
one
chip
chip
to
to
create
create
a
a
virtual
virtual
Windows
windows
environment,
environment
but
but
the
the
issue
issue
is
is
that
that
the
the
Windows
windows
guest
guest
operating
operating
system
system
for
for
Arm
arm
is
is
still
still
quite
quite
immature
immature
and
and
needs
needs
a
a
lot
lot
of
of
work.
work
Also,
also
Visual
visual
Studio
studio
2019,
2019
the
the
latest
latest
Visual
visual
Studio
studio
offering
offering
from
from
Microsoft,
microsoft
is
is
unfortunately
unfortunately
not
not
compatible
compatible
with
with
ARM
arm
at
at
all
all
And
and
in
in
my
my
test
test
is
is
not
not
stable
stable
even
even
using
using
the
the
built
built
in
in
Windows
windows
translation
translation
of
of
X64
x64
software
software
to
to
run
run
on
on
ARM
arm
hardware.
hardware
For
for
game
game
developers
developers
that
that
use
use
Unity,
unity
I'm
i'm
pleased
pleased
to
to
say
say
that
that
it
it
works
works
surprisingly
surprisingly
well
well
on
on
Apple
apple
Silicon
silicon
via
via
Rosetta.
rosetta
However,
however
it's
it's
not
not
as
as
performant
performant
as
as
running
running
natively
natively
on
on
x86.
x86
But
but
by
by
the
the
time
time
you
you
watch
watch
this
this
video,
video
Unity
unity
might
might
have
have
a
a
version
version
natively
natively
compatible
compatible
with
with
M1,
m1
which
which
I
i
know
know
they're
they're
working
working
hard
hard
to
to
get
get
out
out
as
as
soon
soon
as
as
possible.
possible
Overall,
overall
Apple
apple
Silicon
silicon
has
has
really
really
put
put
a
a
boost
boost
into
into
many
many
workflows
workflows
for
for
developers
developers
and
and
other
other
professions
professions
And
and
eventually
eventually
even
even
gaming.
gaming
And
and
with
with
the
the
m
m
one
one
tests,
tests
we're
we're
seeing
seeing
the
the
improvements
improvements
with
with
just
just
their
their
entry
entry
level
level
machines.
machines
The
the
upcoming
upcoming
second
second
and
and
third
third
generation
generation
Apple
apple
Silicon
silicon
machines
machines
will
will
be
be
even
even
more
more
performant,
performant
and
and
I
i
can't
can't
wait
wait
to
to
see
see
that.
that
I
i
think
think
it's
it's
really
really
gonna
gonna
help
help
us
us
as
as
developers
developers
move
move
to
to
the
the
next
next
level.
level
And
and
I
i
think
think
it's
it's
just
just
gonna
gonna
lift
lift
up
up
the
the
entire
entire
industry.
industry
To
to
follow
follow
the
the
updates
updates
on
on
the
the
new
new
Apple
apple
Silicon
silicon
chips
chips
as
as
they
they
relate
relate
to
to
us,
us
developers,
developers
as
as
well
well
as
as
seeing
seeing
me
me
conduct
conduct
these
these
tests
tests
that
that
I've
i've
been
been
discussing
discussing
here,
here
consider
consider
subscribing
subscribing
to
to
my
my
channel
channel
as
as
well.
well
The
the
link
link
is
is
down
down
below.
below
I'm
i'm
gonna
gonna
wrap
wrap
it
it
up
up
there.
there
Thanks
thanks
to
to
FireShip
fireship
for
for
hosting
hosting
me
me
to
to
share
share
this
this
amazing
amazing
new
new
world
world
that
that
we're
we're
about
about
to
to
enter
enter
as
as
developers.
developers
success
The new Apple machines have benefits such as efficiency, speed, and energy efficiency, as well as improved productivity. They also have potential for efficient design and technology stacks, with the potential for workflows and benefits for developers. The chip design is seen as beneficial for developers, but workflows for developers and other industries remain in their early stages. The chip is designed with improved performance and scalability, and subscribers can receive updates through their channel.
How a CPU Works in 100 Seconds // Apple Silicon M1 vs Intel i9
The Central Processing Unit, or CPU, is like the engine in your car or the brain in your skull, and is like a really fancy calculator used to run the applications on your computer. When you write software in a language like JavaScript or Python, you're actually writing a set of instructions that will be execute it as machine code by a CPU, which itself is a carefully crafted piece of metal and silicon that contains billions of tiny transistors or on off switches that represent ones and zeros. To perform mathematical calculations, a CPU will combine multiple transistors together to form logic gates. For example, and will take 2 binary inputs and validate that both are true to produce a true output. It only takes a few basic logic gates to solve really complex computational problems. Modern chips contain billions of transistors and they can be flipped on and off billions of times per second. The state of the CPU is synchronized by an oscillator known as the clock generator. In general, the more times the clock can pulse per second, the faster the CPU can compute, and is normally measured in gigahertz. Gamers will sometimes overclock their CPUs to gain more performance at the cost of higher temperatures and a lower life expectancy. Now in order to run applications, it interacts with the system memory or RAM in a series of 4 steps known as the machine or instruction cycle. Step 1 is the fetch phase. Think of a software program as a set of instructions stored in the RAM. The CPU has registers temporarily store the address in memory that it wants to interact with. The program counter starts at 0 and copies that address to the memory address register. Then the control unit sends out a signal to copy the data from that address to the instruction register. At which point, it needs to figure out how to use this instruction in the decode phase. The control unit parses the actual bits in the instruction. Most importantly, the opt code contains the instruction, like add or subtract, and the operand is the address in memory to perform that operation on. The final execute stage takes the decoded information and passes it as electrical signals to the relevant parts of the CPU. The Arithmetic Logic Unit or ALU, can perform math on the data and then store the results in RAM to change the state of the program. The cycle is repeated billions of times per second and modern chips, utilize multiple CPU cores to run multiple computations in parallel. That's how a CPU works under the hood, but there's a lot more you should know about processor architectures if you're a developer. And that's why I've invited Alex from the most underrated tech channel on YouTube to break down some more advanced concepts like Apple Silicon and how to run performance benchmarking on your own machine. Hi, everybody. My name is Alex and I'm here to take you beyond 100 seconds in your quest to learn about how processor architectures differ And also how those differences affect our productivity as developers. I'll show you what the Apple Silicon chip and a refrigerator have in common, And then I'll share some of my own experiences with using developer tools and build execution on the 1st generation Apple Silicon chip call the M1 Chip as compared to the Intel Chip. 1st and foremost, I just wanna say that my personal productivity as a developer depends less on processors inside my computer and more on how much coffee I had and whether I'm trying to work after a big meal. But aside from human factors, let's dig deeper into why the new Apple Silicon machines have been really kicking up a storm and changing the industry, Software development included. And spoiler alert, the m one machines have been beating the Intel machines in pretty much every build test I've thrown at it, except a couple. But it's not all roses, so let's talk about some downsides later too. So why is it so darn fast? Test. The first point I wanna discuss is the physicality differences of the new Apple Silicon way versus the old Intel call an AMD way. This is what Apple silicon and your refrigerator at home have in common. Alright. Imagine for a minute that you wanna make a turkey with cheese sandwich. You go over to the refrigerator and in one place, you have the turkey breast, the cheese, the mayonnaise, the mustard. All those ingredients are right there in one place and you don't have to run around the house to gather them. You don't have to drive to lots of stores to pick them up and this saves you lots of time and energy. This kind of efficiency can be found in the new Apple Silicon Chips because they aren't just a new processor. Apple Silicon is a collection of many chips that are housed inside one silicon container. And this type of system is known as a system on chip or sock And it's essentially an entire computer on one chip. The main CPU, the GPU, the IO controller, the ML engine, They're all collocated, so when the task is to make an electronic sandwich, so to speak, or in other words, to do some work that involves all these different components, A system on chip is going to be a lot more efficient in terms of energy usage using only a tiny bit of power and at the same time is going to be faster than say a typical machine that has all the components separate. Intel based machines have a CPU that's a single chip. And memory is located somewhere else on the motherboard. The IO is somewhere else. The individual components might be even more powerful than the ones available at the moment on the latest Apple Silicon based machines, but that comes at a cost since these powerful components are like supermarkets That carry different sandwich ingredients. As a result, when you want a sandwich on an Intel machine, you'll have to drive all over town because one store will have the turkey, another store will have the cheese, yet another store will have the mayonnaise. Each store might be really good at their own process and have the best ingredients. But each store also takes a lot of power to run, losing out on the efficiency. And since all you really want is just to make a simple sandwich, you're wasting Taking a ton of time and energy picking up the ingredients from all the different stores. Of course, some might say the drawback with come on chip design is that, at least for now, with the current selection of Apple Macs, you won't be able to upgrade or change any of the components. You get what's on the menu and that's it. But that's not news to most people that are familiar with the Apple ecosystem. Once you accept that idea, you might even see the benefits of having a more efficient design where where all the components are on one chip and they outweigh the cons and still provide better performance than the alternative. Alright. That's enough talk about food. So how does this all affect real world development workflows? So I've been doing a bunch of developer focused tests on the latest Apple Silicon machines over on my channel as well as comparing them to other machines like the Intel Macs and PC machines too. And in general, the new design has been showing really great promise for my own workflows as a developer, coffee and sandwiches excluded. Now there Are lots of technology stacks that developers use, of course, and I'm trying builds in a few of them. But now, let me share some of the results I've seen with Node and JavaScript tests. And after that, I'll also discuss the tech stacks that have the biggest gains on the new machines and also the stacks that have the biggest losses right now at the moment. I started off trying out some existing JavaScript tests that are in the browser and then in Node. The browser test consisted of running speedometer, Which is a browser benchmark that measures the responsiveness of web applications. It uses demo web apps to simulate their actions such as adding to do items. You visit the app in the browser of choice. I tried Chrome and Safari for this, and you execute the automated test that runs through a collection of applications built with some of the more popular UI frameworks like Angular, React, Ember, even vanilla JS and jQuery, and a whole bunch more. And then this test reports the results as a single number when it's done. This number represents the runs per minute and the higher the better. When it was finished, I found that it has significantly more iterations on the m one. Safari had the best results even going off the scale and Chrome did pretty well too. I also ran some JavaScript benchmarks in a node environment and found a pretty CPU intensive algorithm called fan cook redux That's implemented in JavaScript and created for benchmarks game, a website that collects algorithms and tests in different languages. And while my 16 inch MacBook Pro with the Intel Core I9 Processor did beat the MacBook Air with the M1 Chip, it really didn't do so by a lot. And when you consider the price differences between the machines and the fact that the m one stayed cool throughout the test and that the battery hardly even took a hit on the m one, You might be thinking whether the extra few seconds saved while running this benchmark on the Intel I9 is really worth the money. So running benchmarks is often very telling, But it doesn't necessarily line up with real world scenarios. So that's why I also like to conduct my own tests, whether using my own projects Or other open source projects that are out there and that commenters sent to me. And here's what I found. I ran a build of the official NativeScript plugins repository, which is project based on NX workspaces. If you're not familiar with NX workspaces, it allows you to scale large JavaScript and other tech stack projects, And you can see the NX quick start right here on this channel. In my test, the build that took about 3 minutes on each machine only differed in build time by tens of seconds. With the M1 MacBook Air beating out the Intel MacBook Pro 2 out of 3 times. So let's talk about what dev stacks benefit the most from the new Apple Silicon chips at this time. For JavaScript developers, the benefits are already visible. However, if you're building mobile apps for iOS for compiling c plus plus code, then this is where you'll see a 40 to 50% improvement in build times. I ran a few x code builds and swift builds, And I did some c plus plus algorithms and built OpenCV and Webkit. In all those tests, the m one came out on top. So what dev stacks benefit the least? So far in my own testing, any builds that have to do with running natively built software and building using native tooling has absolutely destroyed intel and speed and battery performance, native being compiled for the Apple Silicon architecture. Even when running some software via Apple's Rosetta, That's the translation layer that allows you to run Intel and AMD based x64 and x86 programs on the new Apple hardware. Even some of those software packages ran better than on Intel. And that's just amazing. But there are workflows that aren't ready yet, in my opinion. If you are an Android developer, Android Studio And official Android emulators work on Apple Silicon, but they're currently using Rosetta for translations. And while Rosetta is generally pretty good at running x86 targeted code on arm chips, it's not enough for the CPU hungry Android workflows and I found the results to be not very usable at the moment. The latest version of dot net, which is version 5 right now, Isn't fully supported to run on ARM. Simple console applications ran just fine for me, but testing any web work flows like asp.netcore. Doesn't work at all yet. Now it's expected that by the end of this year, dot net 6 will come out. It's in alpha right now and we'll have full support for Arm. Until then, if you need to develop dot net apps, I suggest using a PC with Windows. Oh, and if you think you can use a virtual Windows machine, I've tested this as well. Parallels is the only vendor that currently supports the m one chip to create a virtual Windows environment, but the issue is that the Windows guest operating system for Arm is still quite immature and needs a lot of work. Also, Visual Studio 2019, the latest Visual Studio offering from Microsoft, is unfortunately not compatible with ARM at all And in my test is not stable even using the built in Windows translation of X64 software to run on ARM hardware. For game developers that use Unity, I'm pleased to say that it works surprisingly well on Apple Silicon via Rosetta. However, it's not as performant as running natively on x86. But by the time you watch this video, Unity might have a version natively compatible with M1, which I know they're working hard to get out as soon as possible. Overall, Apple Silicon has really put a boost into many workflows for developers and other professions And eventually even gaming. And with the m one tests, we're seeing the improvements with just their entry level machines. The upcoming second and third generation Apple Silicon machines will be even more performant, and I can't wait to see that. I think it's really gonna help us as developers move to the next level. And I think it's just gonna lift up the entire industry. To follow the updates on the new Apple Silicon chips as they relate to us, developers, as well as seeing me conduct these tests that I've been discussing here, consider subscribing to my channel as well. The link is down below. I'm gonna wrap it up there. Thanks to FireShip for hosting me to share this amazing new world that we're about to enter as developers.
The new Apple machines have benefits such as efficiency, speed, and energy efficiency, as well as improved productivity. They also have potential for efficient design and technology stacks, with the potential for workflows and benefits for developers. The chip design is seen as beneficial for developers, but workflows for developers and other industries remain in their early stages. The chip is designed with improved performance and scalability, and subscribers can receive updates through their channel.

        [INST]
        You are youtuber called Fireship you make engaging high-intensity and entertaining coding tutorials and tech news. 
        you covers a wide range of topics relevant to programmers, aiming to help them learn and improve their skills quickly.
        
        Given the title of the video : How a CPU Works in 100 Seconds // Apple Silicon M1 vs Intel i9 
        and a small summary : The new Apple machines have benefits such as efficiency, speed, and energy efficiency, as well as improved productivity. They also have potential for efficient design and technology stacks, with the potential for workflows and benefits for developers. The chip design is seen as beneficial for developers, but workflows for developers and other industries remain in their early stages. The chip is designed with improved performance and scalability, and subscribers can receive updates through their channel.
        [/INST]
        
        Generate the video : The Central Processing Unit, or CPU, is like the engine in your car or the brain in your skull, and is like a really fancy calculator used to run the applications on your computer. When you write software in a language like JavaScript or Python, you're actually writing a set of instructions that will be execute it as machine code by a CPU, which itself is a carefully crafted piece of metal and silicon that contains billions of tiny transistors or on off switches that represent ones and zeros. To perform mathematical calculations, a CPU will combine multiple transistors together to form logic gates. For example, and will take 2 binary inputs and validate that both are true to produce a true output. It only takes a few basic logic gates to solve really complex computational problems. Modern chips contain billions of transistors and they can be flipped on and off billions of times per second. The state of the CPU is synchronized by an oscillator known as the clock generator. In general, the more times the clock can pulse per second, the faster the CPU can compute, and is normally measured in gigahertz. Gamers will sometimes overclock their CPUs to gain more performance at the cost of higher temperatures and a lower life expectancy. Now in order to run applications, it interacts with the system memory or RAM in a series of 4 steps known as the machine or instruction cycle. Step 1 is the fetch phase. Think of a software program as a set of instructions stored in the RAM. The CPU has registers temporarily store the address in memory that it wants to interact with. The program counter starts at 0 and copies that address to the memory address register. Then the control unit sends out a signal to copy the data from that address to the instruction register. At which point, it needs to figure out how to use this instruction in the decode phase. The control unit parses the actual bits in the instruction. Most importantly, the opt code contains the instruction, like add or subtract, and the operand is the address in memory to perform that operation on. The final execute stage takes the decoded information and passes it as electrical signals to the relevant parts of the CPU. The Arithmetic Logic Unit or ALU, can perform math on the data and then store the results in RAM to change the state of the program. The cycle is repeated billions of times per second and modern chips, utilize multiple CPU cores to run multiple computations in parallel. That's how a CPU works under the hood, but there's a lot more you should know about processor architectures if you're a developer. And that's why I've invited Alex from the most underrated tech channel on YouTube to break down some more advanced concepts like Apple Silicon and how to run performance benchmarking on your own machine. Hi, everybody. My name is Alex and I'm here to take you beyond 100 seconds in your quest to learn about how processor architectures differ And also how those differences affect our productivity as developers. I'll show you what the Apple Silicon chip and a refrigerator have in common, And then I'll share some of my own experiences with using developer tools and build execution on the 1st generation Apple Silicon chip call the M1 Chip as compared to the Intel Chip. 1st and foremost, I just wanna say that my personal productivity as a developer depends less on processors inside my computer and more on how much coffee I had and whether I'm trying to work after a big meal. But aside from human factors, let's dig deeper into why the new Apple Silicon machines have been really kicking up a storm and changing the industry, Software development included. And spoiler alert, the m one machines have been beating the Intel machines in pretty much every build test I've thrown at it, except a couple. But it's not all roses, so let's talk about some downsides later too. So why is it so darn fast? Test. The first point I wanna discuss is the physicality differences of the new Apple Silicon way versus the old Intel call an AMD way. This is what Apple silicon and your refrigerator at home have in common. Alright. Imagine for a minute that you wanna make a turkey with cheese sandwich. You go over to the refrigerator and in one place, you have the turkey breast, the cheese, the mayonnaise, the mustard. All those ingredients are right there in one place and you don't have to run around the house to gather them. You don't have to drive to lots of stores to pick them up and this saves you lots of time and energy. This kind of efficiency can be found in the new Apple Silicon Chips because they aren't just a new processor. Apple Silicon is a collection of many chips that are housed inside one silicon container. And this type of system is known as a system on chip or sock And it's essentially an entire computer on one chip. The main CPU, the GPU, the IO controller, the ML engine, They're all collocated, so when the task is to make an electronic sandwich, so to speak, or in other words, to do some work that involves all these different components, A system on chip is going to be a lot more efficient in terms of energy usage using only a tiny bit of power and at the same time is going to be faster than say a typical machine that has all the components separate. Intel based machines have a CPU that's a single chip. And memory is located somewhere else on the motherboard. The IO is somewhere else. The individual components might be even more powerful than the ones available at the moment on the latest Apple Silicon based machines, but that comes at a cost since these powerful components are like supermarkets That carry different sandwich ingredients. As a result, when you want a sandwich on an Intel machine, you'll have to drive all over town because one store will have the turkey, another store will have the cheese, yet another store will have the mayonnaise. Each store might be really good at their own process and have the best ingredients. But each store also takes a lot of power to run, losing out on the efficiency. And since all you really want is just to make a simple sandwich, you're wasting Taking a ton of time and energy picking up the ingredients from all the different stores. Of course, some might say the drawback with come on chip design is that, at least for now, with the current selection of Apple Macs, you won't be able to upgrade or change any of the components. You get what's on the menu and that's it. But that's not news to most people that are familiar with the Apple ecosystem. Once you accept that idea, you might even see the benefits of having a more efficient design where where all the components are on one chip and they outweigh the cons and still provide better performance than the alternative. Alright. That's enough talk about food. So how does this all affect real world development workflows? So I've been doing a bunch of developer focused tests on the latest Apple Silicon machines over on my channel as well as comparing them to other machines like the Intel Macs and PC machines too. And in general, the new design has been showing really great promise for my own workflows as a developer, coffee and sandwiches excluded. Now there Are lots of technology stacks that developers use, of course, and I'm trying builds in a few of them. But now, let me share some of the results I've seen with Node and JavaScript tests. And after that, I'll also discuss the tech stacks that have the biggest gains on the new machines and also the stacks that have the biggest losses right now at the moment. I started off trying out some existing JavaScript tests that are in the browser and then in Node. The browser test consisted of running speedometer, Which is a browser benchmark that measures the responsiveness of web applications. It uses demo web apps to simulate their actions such as adding to do items. You visit the app in the browser of choice. I tried Chrome and Safari for this, and you execute the automated test that runs through a collection of applications built with some of the more popular UI frameworks like Angular, React, Ember, even vanilla JS and jQuery, and a whole bunch more. And then this test reports the results as a single number when it's done. This number represents the runs per minute and the higher the better. When it was finished, I found that it has significantly more iterations on the m one. Safari had the best results even going off the scale and Chrome did pretty well too. I also ran some JavaScript benchmarks in a node environment and found a pretty CPU intensive algorithm called fan cook redux That's implemented in JavaScript and created for benchmarks game, a website that collects algorithms and tests in different languages. And while my 16 inch MacBook Pro with the Intel Core I9 Processor did beat the MacBook Air with the M1 Chip, it really didn't do so by a lot. And when you consider the price differences between the machines and the fact that the m one stayed cool throughout the test and that the battery hardly even took a hit on the m one, You might be thinking whether the extra few seconds saved while running this benchmark on the Intel I9 is really worth the money. So running benchmarks is often very telling, But it doesn't necessarily line up with real world scenarios. So that's why I also like to conduct my own tests, whether using my own projects Or other open source projects that are out there and that commenters sent to me. And here's what I found. I ran a build of the official NativeScript plugins repository, which is project based on NX workspaces. If you're not familiar with NX workspaces, it allows you to scale large JavaScript and other tech stack projects, And you can see the NX quick start right here on this channel. In my test, the build that took about 3 minutes on each machine only differed in build time by tens of seconds. With the M1 MacBook Air beating out the Intel MacBook Pro 2 out of 3 times. So let's talk about what dev stacks benefit the most from the new Apple Silicon chips at this time. For JavaScript developers, the benefits are already visible. However, if you're building mobile apps for iOS for compiling c plus plus code, then this is where you'll see a 40 to 50% improvement in build times. I ran a few x code builds and swift builds, And I did some c plus plus algorithms and built OpenCV and Webkit. In all those tests, the m one came out on top. So what dev stacks benefit the least? So far in my own testing, any builds that have to do with running natively built software and building using native tooling has absolutely destroyed intel and speed and battery performance, native being compiled for the Apple Silicon architecture. Even when running some software via Apple's Rosetta, That's the translation layer that allows you to run Intel and AMD based x64 and x86 programs on the new Apple hardware. Even some of those software packages ran better than on Intel. And that's just amazing. But there are workflows that aren't ready yet, in my opinion. If you are an Android developer, Android Studio And official Android emulators work on Apple Silicon, but they're currently using Rosetta for translations. And while Rosetta is generally pretty good at running x86 targeted code on arm chips, it's not enough for the CPU hungry Android workflows and I found the results to be not very usable at the moment. The latest version of dot net, which is version 5 right now, Isn't fully supported to run on ARM. Simple console applications ran just fine for me, but testing any web work flows like asp.netcore. Doesn't work at all yet. Now it's expected that by the end of this year, dot net 6 will come out. It's in alpha right now and we'll have full support for Arm. Until then, if you need to develop dot net apps, I suggest using a PC with Windows. Oh, and if you think you can use a virtual Windows machine, I've tested this as well. Parallels is the only vendor that currently supports the m one chip to create a virtual Windows environment, but the issue is that the Windows guest operating system for Arm is still quite immature and needs a lot of work. Also, Visual Studio 2019, the latest Visual Studio offering from Microsoft, is unfortunately not compatible with ARM at all And in my test is not stable even using the built in Windows translation of X64 software to run on ARM hardware. For game developers that use Unity, I'm pleased to say that it works surprisingly well on Apple Silicon via Rosetta. However, it's not as performant as running natively on x86. But by the time you watch this video, Unity might have a version natively compatible with M1, which I know they're working hard to get out as soon as possible. Overall, Apple Silicon has really put a boost into many workflows for developers and other professions And eventually even gaming. And with the m one tests, we're seeing the improvements with just their entry level machines. The upcoming second and third generation Apple Silicon machines will be even more performant, and I can't wait to see that. I think it's really gonna help us as developers move to the next level. And I think it's just gonna lift up the entire industry. To follow the updates on the new Apple Silicon chips as they relate to us, developers, as well as seeing me conduct these tests that I've been discussing here, consider subscribing to my channel as well. The link is down below. I'm gonna wrap it up there. Thanks to FireShip for hosting me to share this amazing new world that we're about to enter as developers.
        