Optimized Printing
I've just heard something so crazy, I've had to test it myself (resulting in this post). The problem Below, you can find 3 snippets of code that all loop 2^24 times printing i: First, classic cpp: 1 2 3 4 5 6 7 8 #include <iostream> #include <cmath> int main() { for (int i = 0; i < std::pow(2, 24); i++) { std::cout << i << std::endl; } return 0; } Secondly, only 6 years younger - but 6 lines more compact, python: ...