about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorUlrik Sverdrup <bluss@users.noreply.github.com>2016-11-23 23:02:30 +0100
committerUlrik Sverdrup <bluss@users.noreply.github.com>2016-11-24 16:55:46 +0100
commita54ddfb676c59bcf0dd3dc8ef869a6e5ac4afc0b (patch)
tree46a2f3a421d54269a87342b9c9f0c928f2e66f62 /src/test/run-pass/thinlto
parent7611e424a7274ab1094ceebc0381e36e81b4db72 (diff)
downloadrust-a54ddfb676c59bcf0dd3dc8ef869a6e5ac4afc0b.tar.gz
rust-a54ddfb676c59bcf0dd3dc8ef869a6e5ac4afc0b.zip
core: Unroll the loop in the slice iterator search methods
Introduce a helper method .search_while() that generalizes internal
iteration (Iterator's all, find, position, fold and so on).

The compiler does not unroll loops with conditional exits; we can do
this manually instead to improve the performance of for example
Iterator::find and Iterator::position when used on the slice iterators.

The unrolling is patterned on libstdc++'s implementation of std::find_if.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions