MCPcopy Create free account
hub / github.com/dendibakh/perf-ninja

github.com/dendibakh/perf-ninja @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,390 symbols 3,938 edges 191 files 200 documented · 14% updated 2d ago★ 3,77212 open issues

Browse by type

Functions 1,261 Types & classes 129
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Linux Windows Windows Linux

Performance Ninja Class

YouTube X (formerly Twitter) Follow GitHub Repo stars

This is an online course where you can learn to find and fix low-level performance issues, for example CPU cache misses and branch mispredictions. It's all about practice. So we offer you this course in a form of lab assignments and youtube videos. You will spend at least 90% of the time analyzing performance of the code and trying to improve it.

Each lab assignment focuses on a specific performance problem and can take anywhere from 30 mins up to 4 hours depending on your background and the complexity of the lab assignment itself. Once you're done improving the code, you can submit your solution to Github for automated benchmarking and verification.

Performance Ninja is supported on Linux, Windows, and Mac, and is run on all the recent HW including Intel's 12th-gen Alderlake, AMD's Zen3, and Apple's M1 CPUs. You can observe the effect of your optimizations on a variety of modern platforms.

Prerequisites: basic C++ skills are an absolute must-have for the course. Denis' book "Performance Analysis and Tuning on Modern CPUs" is recommended as an introduction to performance analysis basics. Knowledge of compilers, computer architecture, and the ability to read assembly code is a plus.

Before you start working on lab assignments, make sure you read Get Started page and watch the warmup video.

Lab assignments in this project are implemented in C++. Also, Performance Ninja was ported to: * Rust (perf-ninja-rs), thanks to @grahamking. * Zig (perf-ninja-zig), thanks to @JonathanHallstrom.

Lab assignments

Support the project

Performance Ninja is in a very much work-in-progress state. We will be adding new lab assignments and videos! The course is free by default, but we ask you to support us on Github Sponsors, Patreon or PayPal. Your sponsorship will speed up adding new lab assignments.

Current sponsors: * Pavel Davydov (@pdavydov108) * Matias Christensen * Maya Lekova (@MayaLekova) * Aaron St. George (@AaronStGeorge)

Thanks to Mansur Mavliutov (@Mansur) for providing an AMD-based machine for running CI jobs.

Lab authors: * Andrew Evstyukhin (@andrewevstyukhin) * Ivica Bogosavljevic (@ibogosavljevic) * René Rahn (@rrahn) * Adam Folwarczny (@adamf88) * Jakub Beránek (@Kobzol) * Jakub Gałecki (@kubagalecki) * Jonathan Hallstrom (@JonathanHallstrom) * Oleg Makovski (@0legmak) * Denis Bakhvalov (@dendibakh)

Contributing

We warmly welcome contributions! See Contributing.md for the details.

Please write to dendibakh@gmail.com with suggestions.

Copyright © 2025 by Denis Bakhvalov under Creative Commons license (CC BY 4.0).

Core symbols most depended-on inside this repo

Shape

Function 1,021
Method 240
Class 119
Enum 10

Languages

C54%
C++36%
Python9%

Modules by API surface

labs/core_bound/compiler_intrinsics_2/inputs/LoopVectorize.cpp209 symbols
labs/misc/pgo/lua/lparser.c76 symbols
labs/misc/pgo/lua/lapi.c76 symbols
labs/misc/pgo/lua/lcode.c56 symbols
labs/misc/pgo/lua/lauxlib.c49 symbols
tools/gbench/report.py44 symbols
buildbot/gbench/report.py44 symbols
labs/misc/pgo/lua/lstrlib.c43 symbols
labs/misc/pgo/lua/lbaselib.c43 symbols
labs/misc/pgo/lua/liolib.c41 symbols
labs/misc/pgo/lua/ldebug.c33 symbols
labs/misc/pgo/lua/lgc.c30 symbols

For agents

$ claude mcp add perf-ninja \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page