Daniel Lemire personal blog

For processing strings, streams in C++ can be slow

The C++ library has long been organized around stream classes, at least when it comes to reading and parsing strings. But streams can be surprisingly slow. For example, if you want to parse numbers, then this C++ routine is close to being the worst possible choice for performance: std::stringstream in(mystring)…
Points
105
HN comments
101
Submissions
1
Cited by
0 commenters

Software EngineeringSystems & Performance2023

On Hacker News

SubmittedTitle on HNPointsComments
Dec 6, 2023For processing strings, streams in C++ can be slow by greghn105101

More from Daniel Lemire

All 87 posts →

Related posts from the same era