+ 1
How to take faster IO in c++ as cout and cin are slower!!
4 Réponses
+ 1
Well,... for cout you are right. It is slower than printf. But the difference is way too small to make an actual performance gain if you use printf.
And for cin: the worst bottleneck of cin or any other User-Input is actually the user itself. If you can type faster than cin accepts your input let me know :P
Here is a comparison of printf & cout tho:
http://typethinker.blogspot.de/2010/05/are-c-iostreams-really-slow.html?m=1
+ 1
im talking about competitive coding where user is much faster than the runtime itself!! your article is helpful bt cant agree to what u said about cin !! 😑
+ 1
ios_base::sync_with_stdio(false)
0
thanks alex, for the article