diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-10-30 23:53:50 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-10-30 23:53:50 +0000 |
commit | ef915d3ef476f9de691300b6c6f9862b6b5607f8 (patch) | |
tree | 75869e0b7beb16030ce650e9538146d425e4d242 /libcxx/docs/DesignDocs | |
parent | 299e67291c49cf28cf42e77b2ecdce1485a60ceb (diff) | |
download | bcm5719-llvm-ef915d3ef476f9de691300b6c6f9862b6b5607f8.tar.gz bcm5719-llvm-ef915d3ef476f9de691300b6c6f9862b6b5607f8.zip |
Improve performance of constructing filesystem::path from strings.
This patch fixes a performance bug when constructing or appending to a path
from a string or c-string. Previously we called 'push_back' to append every
single character. This caused multiple re-allocation and copies when at most
one reallocation is necessary. The new behavior is to simply call
`string::append` so it can correctly handle reallocation.
For large strings this change is a ~4x improvement. This also makes our path
faster to construct than libstdc++'s.
llvm-svn: 285530
Diffstat (limited to 'libcxx/docs/DesignDocs')
0 files changed, 0 insertions, 0 deletions