Optimising is a process, it isn’t one specific thing you do. Basically any change you make to improve program performance is optimisation, and that’s generally achieved by using fewer system resources.
It can be anything including removing unnecessary code, simplifying complex code, taking shortcuts, hardcoding things with safe assumptions, using different code that works better with certain platforms/hardware. Sometimes you can tweak things to achieve massive performance gains with minimal noticeable impact.
Latest Answers