about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-24 13:51:19 -0700
committerbors <bors@rust-lang.org>2014-04-24 13:51:19 -0700
commit7d70434a1e0ba68753b7d1e83f594dea6d23dd51 (patch)
tree579de48360e79cc80ca660e005648378be60a19a /src/rustllvm/RustWrapper.cpp
parent3485d90728fe8dc076c6362211bf1f62830c97d8 (diff)
parentb536d2bb763d478dbf96c035dbd5b68b5ff639b9 (diff)
downloadrust-7d70434a1e0ba68753b7d1e83f594dea6d23dd51.tar.gz
rust-7d70434a1e0ba68753b7d1e83f594dea6d23dd51.zip
auto merge of #13720 : aturon/rust/walk_dir-perf, r=alexcrichton
The `walk_dir` iterator was simulating a queue using a vector (in particular, using `shift`),
leading to O(n^2) performance. Since the order was not well-specified (see issue #13411),
the simplest fix is to use the vector as a stack (and thus yield a depth-first traversal).
This patch does exactly that, and adds a test checking for depth-first behavior.

Note that the underlying `readdir` function does not specify any particular order, nor
does the system call it uses.

Closes #13411.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions