我刚刚用 gprof 分析了我的程序并得到了这个:
100.01 0.01 0.01 23118 0.43 0.43 std::vector<int, std::allocator<int> >::operator=(std::vector<int, std::allocator<int> > const&)
这让我感到困惑,因为它说它使用 = 运算符的时间为 100.01%。我猜对了吗,这意味着它只是一直在复制数据,并且允许程序使用多少内存有限制吗?