Re:Effortless Performance Improvements in C++: std:vector
by returningfory2 on Wednesday March 08, 2023 @06:22PM
(#35076164)
A complementary idea is to reuse the vector of strings across different calls to `tokenize`. The main loop in the code is of the form:
which you could change to
Combined with your suggestion to use std::string_view, this would mean only O(1) allocations across the program for this part of the code.
[ Parent
| on HN ]
There are no comments on this comment yet.