If you’re talking about Debug vs Release mode in Visual Studio, there’s a huge performance hit with STL iterators in Debug mode. Like sometimes 10-20x slower for tight loops. This is obviously C++ not C, so it doesn’t apply to Python directly. But in general toolchains can have very unoptimized code paths in debug mode.