4 ms·
Or where performance is a priority, in my experience. iostream is both slow and bloated. ... I don't like it's API either (it's a horrible abuse of operator<<,
by yoklov 12y ago
Or where performance is a priority, in my experience. iostream is both slow and bloated.
... I don't like it's API either (it's a horrible abuse of operator<<, and is the exact kind of thing you tell people not to do with operator overloading...)
- Cyph0n 12y agoDoes stdio.h work well with std::string? Or do you mean dumping strings entirely and just working with char arrays?
- yoklov 12y agoI just meant iostream. std::strings work fine with cstdio via std::string::c_str(). (e.g. printf("%s\n", some_string.c_str() works fine). That said, I tend to avoid std::string as well, due to other performance issues (you tend to have a lot of copies and lots of heap allocations you don't really need). That said, I work in game development, and don't have to do much string processing, and someone in another domain might find this more painful than I do.