I'm a programmer that's mostly worked with Python so far in my career. At various points, I've run into performance bottlenecks that others have solved by writing high-performance libraries in C++ and Rust, mainly for things like data iterators and network servers.<p>What are some good resources to learn how to write high-performance and low-latency code that can interface with popular languages like Python in 2022? There are a lot of open-source libraries I can analyze and study, but often I feel like the techniques and optimizations they use go way over my head.
This may be a bit of a cop out, but compiled, runtimeless languages are so astonishingly faster than Python on average (especially for things like numeric computation in loops) that you don't actually <i>need</i> to go out of your way to write optimized code. If this is your first systems-level language, the I'd say just focus on getting your head around things like pointers and the stack vs. heap, and you'll find that your code will be plenty fast. Only then,if you really really need more optimization, will it be worth your time to learn about advanced optimization techniques.