I am just curious if there will be a problem if I don't if I keep PBDS code uncommented in my template. Can it cause slow execution time or something like that? Also, in case if anyone knows, why isn't ordered set already included in C++ STL library, it there some problems it can cause in real world applications?
I don't use it at all because I've seen it being the reason for solutions not passing due to it being somewhat slow.
I think it's just because some people don't like to include something they don't use in their code.
No including
PBDS
in your code does not slows execution time but it will increase compilation time. Ordered Set is not included in C++ STL because it is not a part of C++ STL , it's a part of GNU based Policy based data structures and is present inGCC
only.The reasons I can think of why most people comment PBDS code in their template are
hash_standard_resize_policy_imp.hpp0000644
and on including#include<ext/pb_ds/assoc_container.hpp>
in their code throws the error Error was "cannot open source file hash_standard_resize_policy_imp.hpp ". so they don't bother with it and simply comment it out.