
19 Jun
2012
19 Jun
'12
2:39 p.m.
I use boost trim function and find it perform very well in single-thread environment.
But when I call trim function in multi-thread environment, it will have a poor performance.
Perhaps, it's because boot::trim() uses std::locale(), which involves a lot of locks in a multi-threaded environment. But try analysing it with a performance profiler.