rust-lang/rust — pull request #18056 by TeXitoi (2014-10-15 07:36:39+00:00)
Title: Improve shootout-reverse-complement.rs using unsafe code

This is some improvement as asked and discused here: http://www.reddit.com/r/rust/comments/2j2ij3/benchmark_improvement_reverse_compliment/

Before:
```
real 0m0.396s
user 0m0.280s
sys 0m0.112s
```
after:
```
real 0m0.293s
user 0m0.216s
sys 0m0.076s
```
best C version:
```
real 0m0.135s
user 0m0.132s
sys 0m0.060s
```

Another possibility will be to add a `DoubleEndedIterator::next_two_side()` with a deffault implementation, and specialising it for slices, and use it here (`MutableSlice::reverse()` can then become safe). This benchmark will then be safe.

What do you think?