I love generators in python/javascript/etc but nowadays whenever I reach for C++ it's because I need performance. What's the cost of using this abstraction? Are compilers smart enough to convert the equivalent of "for i in range(n)" from python into a regular for loop?