Loading video...

Video Failed to Load

Go Home

Most C Programmers don't have a clue as to how the CPU works. Here is a lecture from my course on the C Language that introduces how to visualise the CPU as a C (or general software) Programmer.... More Details are at: Being able to model the behaviour of...

28,019 views • 1 year ago •via X (Twitter)

7 Comments

Piyush Itankar's profile picture
Piyush Itankar1 year ago

Added three more lectures to the course today.

SecurityPal's profile picture
SecurityPal2 years ago

Discover how a culture of learning and mentorship can shape the future of cybersecurity. In this episode of ‘In Security’ podcast, Ryan Black, CISO at @BlackCloakCyber, discusses the importance of practical tools like the Capture The Flag framework. 🔗:

David Pfohmann's profile picture
David Pfohmann1 year ago

How do you know that most C programmers don't know how the CPU works?

Piyush Itankar's profile picture
Piyush Itankar1 year ago

Have interacted with many C programmers over the past decade and very few could reason about the CPU. What I should have said is “most C programmers I interacted with…”, rather than saying “most C programmers…” Should have made it specific. What’s your opinion?

katzz's profile picture
katzz1 year ago

Great explanation 🫡🫡🫡👏👏

ᗰṳhumuzå ₱ɨuṩ's profile picture
ᗰṳhumuzå ₱ɨuṩ1 year ago

Thank you for this visualization Piyush. It's very insightful

Eduardo Bergel's profile picture
Eduardo Bergel1 year ago

🔖🔖🔖

Related Videos

** Sega Genesis 3D Engine Day 3 ** Blast Processing kicks In !! Converted the Line Drawing and Triangle drawing to 68k Assembly and gained 25% in the line drawing and 33% speedups in the triangle drawing vs C ( so far ) . The scheduler calculating the vertexs is still in C , just the drawing routines are now are in assembly . Possibly 5-10 % gains will come from the scheduler being in ASM also. The Line and Triangle drawing C code took some beating , it was surprising - particularly the line drawing to get a speed up over the C code in ASM. I guess its not too surprising as the C code was basically handling pointers and integers so I had to get exotic to find the speedups. Initially my ASM Line draw was 100% slower than the C code - the first pass conversion from C to ASM is always rough as its more about getting it working then refine later , but yeah 100% slower on first pass was brutal, after 4 hrs tweaking it was 25% faster than the C code so thats a good start - might get more yet. So added more squares and more triangles for load testing at the same frame rate. Its still not anything cohesive but right now focussing on performance in rendering to see how much can be pushed. As rendering will be the biggest cpu soak the faster that goes the better. The smaller triangles take about 1/3 the CPU time of the larger triangles at present so theres definately a fill rate limit vs the setup time to consider. The same would go for the squares been line framed - smaller ones would allow al lot more . #SGDK #SegaGenesis #SegaMegadrive

Shannon Birt

21,171 views • 3 months ago

Jensen Huang just identified the next $200 billion market (Save this). The shift starts with a observation about agentic AI that changes everything about infrastructure. In the era of training and inference, the GPU was everything while CPU was a traffic cop, scheduling work, managing memory, dispatching tasks while the GPU did the heavy lifting. Agentic AI breaks that model entirely. An AI agent does not just run a single inference pass but rather it plans, calls tools, executes code in sandboxes, retrieves data from multiple sources and loops through complex multi-step reasoning sequences often thousands of times per second at scale. Every one of those operations runs through the CPU and the GPU sits idle waiting for the CPU to prepare the next task, supply the right context and execute the retrieval and tool calling logic fast enough to keep the accelerators fed. The CPU is now the conductor and the GPU is the orchestra and the bottleneck is the conductor falling behind. This is showing up in production AI factory utilization right now, which is exactly why Jensen built Vera from scratch rather than licensing x86. Vera achieves 40% lower peak memory latency than x86, 50% faster core to core communication, and 1.8 times the agentic sandbox performance of current x86 processors on a purpose-built architecture designed around the agentic loop. Now here is where the investment thesis gets interesting. The obvious beneficiary is Nvidia itself, and that thesis is real. Nvidia's CFO has guided for nearly $20 billion in Vera CPU revenue this fiscal year alone, a market Nvidia had zero presence in just three years ago. Intel held 60% of server CPU market share as recently as Q4 2025 and that transition is now happening at a pace Intel structurally cannot respond to. But the deeper question is, what architecture is Vera actually built on? Vera's Olympus cores are ARM compatible and every single Vera CPU deployed in every Vera Rubin rack in every data center in the world runs on ARM architecture. And ARM Holdings collects a royalty on every one of them. ARM does not make chips but rather licenses the instruction set architecture and CPU core designs that others build on top of. Every time Nvidia ships a Vera CPU, every time a hyperscaler deploys a Vera Rubin rack, every time an enterprise qualifies Vera for their AI factory, ARM earns a royalty. The secular tailwind here is almost perfectly constructed for ARM's business model. Amazon's Graviton, Microsoft's Cobalt, Google's Axion, Apple's silicon stack, and Qualcomm's data center push all run on ARM. And now Nvidia's Vera, which is projected to displace Intel as the largest server CPU supplier by revenue in a single fiscal year, is ARM. ARM's royalty rate on high end server chips is estimated at roughly 1 to 2% of chip selling price. At $5,000 per Vera CPU and 4 million units projected for FY2027, that is a royalty line growing from near zero to potentially $400 million to $800 million annually from Nvidia's data center CPU business alone before counting Amazon, Microsoft, Google, Apple, and Qualcomm. The total ARM addressable royalty base across all the silicon it already licenses is compounding at a rate that the current $130 billion market cap does not fully reflect. Jensen's CPU thesis is the most underappreciated catalyst in ARM's fundamental story, and the royalty compounding has barely started. Come join Milk Road Pro and get our full ARM royalty model and our entire AI trade thesis. Link below!

Milk Road AI

11,819 views • 2 months ago

*** SEGA GENESIS/MEGADRIVE - SCALING PART 2 *** Whats better on a Friday than seeing some scaling effects on the Megadrive ? .. nothing, so read on ... In the previous part we were software scaling in either axis by a given factor, but I couldn't change the scale factor per scanline on the same frame, so I couldn't skew the base image for tilting into screen eg Mode 7 type effects. - One issue was it was scaling column by column which got wrecked for performance trying per scanline adjustments. So I converted to a row scaler rather than column, this allowed expansions and contractions on a per scanline basis. - Speed up the code significantly , now running a sprite load + music + scaling on cpu with ~50% cpu free. Relied heavily on Python scripts I wrote to generate the 68k assembly for this as it was mind numbing labourious. In doing so I got the scripts competing with each other to come up with the fastest method for each scale , I'm starting to like python ;-) - Tried all sorts to speed up the horizontal interupt - handles vertical scaling, exotic methods eg unsafe interupts / racing the beam & updating the vertical scroll every X cpu cycles, in the end the Z80 cpu (audio) stealing the 68k cpu bus intermittendly just killed these ideas as it would only be 95% stable, ended up just doing smarter interupts that saved a lot of cpu instead. - The good and the bad, spent too long on this is the bad, the good is we will need it in Lufthoheit in a few places to make up for that !! Carsten666 CYBERDEOUS - Crouzet Laurent #SGDK #SegaMegadrive #SegaGenesis

Shannon Birt

11,070 views • 1 year ago