lilydjwg / swapview-rosetta

Print swap usage per process. Implemented in various programming languages
491 stars 108 forks source link

c++: buffer iostream harder #156

Closed Artoria2e5 closed 4 years ago

Artoria2e5 commented 5 years ago

Competitive ricers LOVE this one trick to speed up their iostream. Current *nix compilers are quite smart with optimizing the heck out of C formatter functions (e.g. replacing printf with puts), but with C++ iostream they don't seem to do anything like that.