about summary refs log tree commit diff
path: root/src/libcollectionstest/vec_deque.rs
AgeCommit message (Collapse)AuthorLines
2017-04-03Move libXtest into libX/testsStjepan Glavina-1024/+0
This change moves: 1. `libcoretest` into `libcore/tests` 2. `libcollectionstest` into `libcollections/tests` This is a follow-up to #39561.
2017-03-09Implement placement-in protocol for and `VecDeque`Charlie Fan-1/+23
2017-02-06Extract collections benchmarks to libcollections/benchesSon-47/+0
And libcore/benches
2017-01-28Implement `PartialEq<&[A]>` for `VecDeque<A>`.Corey Farwell-0/+19
Fixes https://github.com/rust-lang/rust/issues/38625.
2016-12-04collections: Simplify VecDeque::is_emptyUlrik Sverdrup-0/+21
Improve is_empty on the VecDeque and its iterators by just comparing tail and head; this saves a few instructions (to be able to remove the `& (size - 1)` computation, it would have to know that size is a power of two).
2016-10-27Auto merge of #37212 - srinivasreddy:libcollectionstest, r=nrcbors-4/+6
run rustfmt on libcollectionstest
2016-10-25run rustfmt on libcollectionstestSrinivas Reddy Thatiparthy-4/+6
2016-10-14Rename static mut to upper caseAleksey Kladov-11/+11
2016-08-04Made vec_deque::Drain, hash_map::Drain, and hash_set::Drain covariantThomas Garcia-0/+6
2016-05-22run rustfmt on libcollections test moduleSrinivas Reddy Thatiparthy-51/+78
2016-04-14Add `contains` to `VecDeque` and `LinkedList` (+ tests)Lukas Kalbertodt-0/+13
2016-03-07mk: Distribute fewer TARGET_CRATESAlex Crichton-4/+0
Right now everything in TARGET_CRATES is built by default for all non-fulldeps tests and is distributed by default for all target standard library packages. Currenly this includes a number of unstable crates which are rarely used such as `graphviz` and `rbml`> This commit trims down the set of `TARGET_CRATES`, moves a number of tests to `*-fulldeps` as a result, and trims down the dependencies of libtest so we can distribute fewer crates in the `rust-std` packages.
2016-01-27collections: Use slices parts in PartialEq for VecDequeUlrik Sverdrup-0/+27
This improves == for VecDeque by using the slice representation. This will also improve further if codegen for slice comparison improves. Benchmark run of 1000 u64 elements, comparing for equality (all equal). Cpu time to compare the vecdeques is reduced to less than 50% of what it was before. ``` test test_eq_u64 ... bench: 1,885 ns/iter (+/- 163) = 4244 MB/s test test_eq_new_u64 ... bench: 802 ns/iter (+/- 100) = 9975 MB/s ```
2016-01-27collections: Hash VecDeque in its slice partsUlrik Sverdrup-0/+19
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
2015-10-19Correct drain implementations in libcollectionstestMichael Layzell-4/+4
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-2/+1
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-2/+0
2015-06-08Implement RFC 839Johannes Oertel-0/+26
Closes #25976.
2015-05-04Implement retain for vec_dequeSteven Allen-0/+9
2015-03-31rollup merge of #23288: alexcrichton/issue-19470Alex Crichton-6/+6
This is a deprecated attribute that is slated for removal, and it also affects all implementors of the trait. This commit removes the attribute and fixes up implementors accordingly. The primary implementation which was lost was the ability to compare `&[T]` and `Vec<T>` (in that order). This change also modifies the `assert_eq!` macro to not consider both directions of equality, only the one given in the left/right forms to the macro. This modification is motivated due to the fact that `&[T] == Vec<T>` no longer compiles, causing hundreds of errors in unit tests in the standard library (and likely throughout the community as well). Closes #19470 [breaking-change]
2015-03-31std: Clean out #[deprecated] APIsAlex Crichton-2/+1
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
2015-03-31std: Remove #[old_orphan_check] from PartialEqAlex Crichton-6/+6
This is a deprecated attribute that is slated for removal, and it also affects all implementors of the trait. This commit removes the attribute and fixes up implementors accordingly. The primary implementation which was lost was the ability to compare `&[T]` and `Vec<T>` (in that order). This change also modifies the `assert_eq!` macro to not consider both directions of equality, only the one given in the left/right forms to the macro. This modification is motivated due to the fact that `&[T] == Vec<T>` no longer compiles, causing hundreds of errors in unit tests in the standard library (and likely throughout the community as well). cc #19470 [breaking-change]
2015-03-17std: Stabilize `IteratorExt::cloned`Alex Crichton-1/+1
This commit stabilizes the `cloned` iterator after tweaking the signature to require that the iterator is over `&T` instead of `U: Deref<T>`. This method has had time to bake for awhile now and it's not clear whether the `Deref` bound is worth it. Additionally, there aren't clear conventions on when to bound and/or implement the `Deref` trait, so for now the conservative route is to require references instead of `U: Deref<T>`. To change this signature to using `Deref` would technically be a backwards-incompatible change, but it is doubtful that any code will actually break in practice.
2015-03-16move some tests back to libcollectionsJorge Aparicio-262/+0
2015-03-16extract libcollections tests into libcollectionstestJorge Aparicio-0/+1150