TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Understanding CPU micro architecture for performance

6 pointsby alblueover 3 years ago

2 comments

alblueover 3 years ago
From the abstract: Microprocessors have evolved over decades to eke out performance from existing code. But the microarchitecture of the CPU leaks into the assumptions of a flat memory model, with the result that equivalent code can run significantly faster by working with, rather than fighting against, the microarchitecture of the CPU.<p>This talk, given for the JChampionsConf in 2022, presents the microarchitecture of modern CPUs, showing how misaligned data can cause cache line false sharing, how branch prediction works and when it fails, how to read CPU specific performance monitoring counters and use that in conjunction with tools like perf and toplev to discover where bottlenecks in CPU heavy code live. We’ll use these facts to revisit performance advice on general code patterns and the things to look out for in executing systems.<p>The talk will be language agnostic, although it will be based on the Linux&#x2F;x86_64 architecture. The presentation was recorded at the JChampionsConf meeting in January 2022, and a recording is available here: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;Pa_l3aHCoGc" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;Pa_l3aHCoGc</a>
alblueover 3 years ago
I gave this presentation; if you have any questions, I’d be happy to answer them as best I can.