Write fast code like a native

Optimization is often considered a second pass in software development, where initially it is tempting to write your business logic out and later think about optimizing it. It has its pros and cons, but the aim of this talk is to provide you with the knowledge that will let you write optimized and fast C++ code as you go, rather than in a second pass. At worst, your optimization passes would become shorter. At best, you would be able to write out fast code in the first go, improving your ability to write efficient systems.

The talk will cover various fundamental principles and concepts useful to form a mental model of how long any given computation or operation may take, and what factors you can think of to make trade-offs while writing code. We will cover this through code examples, microbenchmarks, and looking at assembly code in godbolt. We will also discuss some principles to guide your thought process as you design your systems in an efficiency-first manner, with code examples.

After this talk, attendees would be able to intuitively guess what is a reasonable amount of time for a certain operation from a theoretical perspective. Is 10ms a reasonable time for my web server to respond with a HELLO message? Is 100us enough to compute a machine learning model's output?

Image

Saksham Sharma

Saksham Sharma is a Director of Quantitative Research Technology at Tower Research Capital LLC, a high frequency trading firm based out of New York. He develops low latency and high throughput trading systems and strategies used for the firm's global quantitative trading. In addition, he also helps design and improve big data research infrastructure used for trading research using a combination of C++ and Python. Thanks to an urge to optimize his daily workflow, he also owns the build systems, tooling, and package managers for C++ within his team.In the past, he has worked in the fields of program analysis research, functional programming, and systems security. He is a reformed geek (exemplified by a switch to VSCode after almost a decade with Emacs), and now enjoys driving, guitar, badminton, and snowboarding.

When

July 20-23, 2025

LinkedIn

CppNorth Group