summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-01-27 16:25:36 +0000
committerbors <bors@rust-lang.org>2016-01-27 16:25:36 +0000
commitb2f4c5c596524ceb7b7dcbf6e87105c81a2fa7ac (patch)
treefa8018f86e62c871785a4f25ade295250a55c6ae /src/libstd/sys/unix/stack_overflow.rs
parent8256c470a5ec80509071a70dcfba76666c855a1e (diff)
parentd3174ce75112a52082580065b041f8f4330fefa5 (diff)
downloadrust-b2f4c5c596524ceb7b7dcbf6e87105c81a2fa7ac.tar.gz
rust-b2f4c5c596524ceb7b7dcbf6e87105c81a2fa7ac.zip
Auto merge of #31224 - bluss:deque-hashing, r=Gankro
Hash VecDeque in its slice parts

Use .as_slices() for a more efficient code path in VecDeque's Hash impl.

This still hashes the elements in the same order.

Before/after timing of VecDeque hashing 1024 elements of u8 and
u64 shows that the vecdeque now can match the Vec
(test_hashing_vec_of_u64 is the Vec run).

```
before

test test_hashing_u64        ... bench:  14,031 ns/iter (+/- 236) = 583 MB/s
test test_hashing_u8         ... bench:   7,887 ns/iter (+/- 65) = 129 MB/s
test test_hashing_vec_of_u64 ... bench:   6,578 ns/iter (+/- 76) = 1245 MB/s

after

running 5 tests
test test_hashing_u64        ... bench:   6,495 ns/iter (+/- 52) = 1261 MB/s
test test_hashing_u8         ... bench:     851 ns/iter (+/- 16) = 1203 MB/s
test test_hashing_vec_of_u64 ... bench:   6,499 ns/iter (+/- 59) = 1260 MB/s
```
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions