Rootconf 2025 Annual Conference CfP

Rootconf 2025 Annual Conference CfP

Speak at Rootconf 2025 Annual Conference

Tickets

Loading…

Abhinav Upadhyay

@abhinavu

Writing Code the CPU Loves: A Practical Guide to Hardware-Aware Optimization

Submitted Apr 20, 2025

Why does one piece of code run faster than another, even when they do the same thing? Often, the answer lies in the hardware. This talk is a practical introduction to the core CPU architecture concepts that influence software performance, designed especially for engineers who don’t have a background in computer architecture.

Using a fast-food drive-through as an analogy, we’ll explore instruction pipelining, branch prediction, and caching—three techniques modern CPUs use to execute code efficiently. We’ll map each of these ideas to real-world code examples and discuss how software can be structured to align with the hardware’s strengths. This isn’t a deep dive into microarchitecture, but a hands-on guide to writing hardware-friendly code with intuition.


Takeaways:

  • You’ll gain an intuitive understanding of how modern CPUs execute instructions, and how that impacts the performance of your code.
  • You’ll learn simple, actionable strategies to improve performance by making your code more cache- and branch-predictor-friendly.

Audience:

This session is ideal for backend engineers, performance engineers, DevOps/SREs, and platform engineers who want to go beyond high-level profiling and understand why certain code paths are slower—and how CPU design impacts those bottlenecks.


Speaker Bio:

Abhinav Upadhyay is an independent systems engineer who explores the internals of software and hardware through his writing. He publishes Confessions of a Code Addict, a newsletter focused on compilers, interpreters, operating systems, and performance engineering. With over a decade of experience in backend systems and machine learning, he enjoys diving deep into how things work and sharing those insights with fellow engineers.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hybrid access (members only)

Hosted by

We care about site reliability, cloud costs, security and data privacy