How to learn to optimize my code ? (Junior Dev)

Hi dev , i assume if you visited this post most likely you are much more experienced than me and you can give me some advice .So i have been learning C++ and more intensive C++ for Unreal and when i see job requirements almost every copmany says "Great code OPTIMIZATION skills " , but right now when it comes to my personal knowledge about optimization all i know is try to avoid using Tick() , dynamic memory works slower than static ,delegates are also kind of optimizes code and thats almost it .When i was studing in uni there was “Algorithm” course , where we have studied some sorting algorithms (Bubble,Quick sort , etc) , but when i am coding gameplay mechanics so far i never faced any problem that needs some kind of sorting of something .
So back to my question , how to learn to optimise code ? Maybe some books or documentation ? and WHY algorithms are so important ?

Cheers !

1 Like

So my suggestion is to start competing in the SRM matches on TopCoder, and after the match work through the problems that you couldn’t complete and try to complete them offline. Tutorials are usually posted a few days after a match.

The standard university text on algorithms is called CLRS for short the initials of the authors:

You should read that and do all the exercises.

For whats called non-asymptotic optimization, the best area of study is compiler engineering and operating systems architecture. The dragon book is the standard compiler text:

and tananbaum is the standard operating systems text.