Summary:
Removing string::reserve() which causes O(n^2) penalty.
Fixes #477
Closes https://github.com/facebook/folly/pull/478
Reviewed By: yfeldblum
Differential Revision:
D3850509
Pulled By: Orvid
fbshipit-source-id:
ecf44c35b2aedadc5385d23c325cacab1abfd02d
return c < 10 ? c + '0' : c - 10 + 'a';
};
return c < 10 ? c + '0' : c - 10 + 'a';
};
- out.reserve(out.size() + input.size() + 2);
out.push_back('\"');
auto* p = reinterpret_cast<const unsigned char*>(input.begin());
out.push_back('\"');
auto* p = reinterpret_cast<const unsigned char*>(input.begin());