We’ve spent a lot of time learning about new things that we can make our shaders do, but unfortunately simply knowing how to create a visual effect is only half the battle. When you’re writing shaders for use in a game or other real-time application, you also need to be able to render that visual effect fast enough that your user’s overall experience isn’t impacted. Games that fail to present new frames fast enough or do so at an inconsistent speed are said to have a “performance” problem, and shaders that take a long time for the GPU to execute are a major source of performance problems in games. As such, it’s important as shader writers for us to be able to measure how each shader we write contributes to the total time it takes to present a frame to our users. This kind of performance analysis is known as profiling, and adjusting our program to increase performance is known as optimization.