]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #18056 : TeXitoi/rust/shootout-reverse-complement-improvement, r=alexcr...
authorbors <bors@rust-lang.org>
Fri, 17 Oct 2014 05:42:19 +0000 (05:42 +0000)
committerbors <bors@rust-lang.org>
Fri, 17 Oct 2014 05:42:19 +0000 (05:42 +0000)
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?


Trivial merge