Skip to content

Commit 38d8c8d

Browse files
committed
[DO NOT MERGE] Experiment with removing unrolling from slice::Iter::try_fold
1 parent eceec57 commit 38d8c8d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/libcore/slice/mod.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -3187,12 +3187,13 @@ macro_rules! iterator {
31873187
// manual unrolling is needed when there are conditional exits from the loop
31883188
let mut accum = init;
31893189
unsafe {
3190-
while len!(self) >= 4 {
3191-
accum = f(accum, next_unchecked!(self))?;
3192-
accum = f(accum, next_unchecked!(self))?;
3193-
accum = f(accum, next_unchecked!(self))?;
3194-
accum = f(accum, next_unchecked!(self))?;
3195-
}
3190+
// REMOVED AS AN EXPERIMENT; DO NOT MERGE
3191+
// while len!(self) >= 4 {
3192+
// accum = f(accum, next_unchecked!(self))?;
3193+
// accum = f(accum, next_unchecked!(self))?;
3194+
// accum = f(accum, next_unchecked!(self))?;
3195+
// accum = f(accum, next_unchecked!(self))?;
3196+
// }
31963197
while !is_empty!(self) {
31973198
accum = f(accum, next_unchecked!(self))?;
31983199
}

0 commit comments

Comments
 (0)