Debug builds will always be slower, and this can be particularly noticeable in Visual Studio. If you're using VS, try going to your project properties, make sure you're switched to the Debug build layout, and then go to C/C++ -> Code Generation and change Basic Runtime Checks to Default. It's worth looking at
the documentation too, just so you're aware of what the option does which you're changing