Preface I use the following framework for this performance testing. #include
#include
#include
int main() { struct timeval tv[2]; struct timezone tz; int count = 50000; int elapsed = 0; // .. string initialization gettimeofday(&tv[0], &tz); while(count--)...
from: http://blog.jianingy.com/2008/10/performance-test-on-stdstring.html
Please leave comments to above link
本文提供了一个使用C++进行性能测试的示例代码,通过测试std::string的操作性能,展示了如何利用gettimeofday函数来记录时间并计算操作耗时。
200

被折叠的 条评论
为什么被折叠?



