llvm-project/libcxx/test
Eric Fiselier 1467a197e5 Rewrite std::filesystem::path iterators and parser
This patch entirely rewrites the parsing logic for paths. Unlike the previous
implementation this one stores information about the current state; For example
if we are in a trailing separator or a root separator. This avoids the need for
extra lookahead (and extra work) when incrementing or decrementing an iterator.
Roughly this gives us a 15% speedup over the previous implementation.

Unfortunately this implementation is still a lot slower than libstdc++'s.
Because libstdc++ pre-parses and splits the path upon construction their
iterators are trivial to increment/decrement. This makes libc++ lazy parsing
100x slower than libstdc++. However the pre-parsing libstdc++ causes a ton
of extra and unneeded allocations when constructing the string. For example
`path("/foo/bar/")` would require at least 5 allocations with libstdc++
whereas libc++ uses only one. The non-allocating behavior is much preferable
when you consider filesystem usages like 'exists("/foo/bar/")'.

Even then libc++'s path seems to be twice as slow to simply construct compared
to libstdc++. More investigation is needed about this.

llvm-svn: 285526
2016-10-30 23:30:38 +00:00
..
libcxx Rewrite std::filesystem::path iterators and parser 2016-10-30 23:30:38 +00:00
std Add more tests for optional<const T> 2016-10-28 06:40:29 +00:00
support Silence unused parameter warnings in archetypes.hpp 2016-10-26 17:22:25 +00:00
CMakeLists.txt Fix linker script generation for in-tree builds 2016-10-09 21:34:03 +00:00
lit.cfg Add mork workarounds for running the test suite against libstdc++ 2016-10-12 00:28:14 +00:00
lit.site.cfg.in Add mork workarounds for running the test suite against libstdc++ 2016-10-12 00:28:14 +00:00
nothing_to_do.pass.cpp Test commit: Reverting whitespace changes 2014-07-17 05:10:03 +00:00
testit Add 'nostdinc++' to the flags used by testit. Makes the tests run better on Mac OS X with the new depr.c headers change 2015-11-01 21:14:22 +00:00