Skip to content

Commit

Permalink
Merge pull request #38 from LukasKalbertodt/release-0.4.0
Browse files Browse the repository at this point in the history
Release 0.4.0
  • Loading branch information
LukasKalbertodt authored Aug 27, 2019
2 parents cd2e744 + 4040cce commit 1c7ad55
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: rust
rust:
- stable
- beta
- nightly


script:
Expand All @@ -18,6 +17,14 @@ matrix:
- name: "Check style"
language: generic
script: ./ci/check-basic-style.sh
- name: "Nightly (with benchmarks)"
language: rust
rust: nightly
script:
- cargo build || travis_terminate 1
- cargo build --benches --features=nightly-bench || travis_terminate 1
- cargo test || travis_terminate 1
- cargo doc || travis_terminate 1
- name: "Miri tests (nightly)"
language: rust
rust: nightly
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]


## [0.4.0] - 2019-08-26
This is a pretty large release. The whole crate was more or less completely
rewritten. So it might almost be more useful to forget everything about the
crate and learn everything anew instead of digging through this changelog.
Expand Down Expand Up @@ -142,7 +144,8 @@ crate and learn everything anew instead of digging through this changelog.
- Everything.


[Unreleased]: https://github.com/LukasKalbertodt/stable-vec/compare/v0.3.2...HEAD
[Unreleased]: https://github.com/LukasKalbertodt/stable-vec/compare/v0.4.0...HEAD
[0.3.2]: https://github.com/LukasKalbertodt/stable-vec/compare/v0.3.2...v0.4.0
[0.3.2]: https://github.com/LukasKalbertodt/stable-vec/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/LukasKalbertodt/stable-vec/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/LukasKalbertodt/stable-vec/compare/v0.2.2...v0.3.0
Expand Down
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
[package]
name = "stable-vec"
version = "0.4.0-beta"
version = "0.4.0"
authors = ["Lukas Kalbertodt <[email protected]>"]
edition = "2018"

description = """
A Vec-like collection which guarantees stable indices and features
O(1) deletion of elements (semantically similar to `Vec<Option<T>>`)
A Vec-like collection which guarantees stable indices and features O(1)
element deletion (semantically similar to `Vec<Option<T>>`). Useful for
allocations in graphs or similar data structures.
"""
documentation = "https://docs.rs/stable-vec"
repository = "https://github.com/LukasKalbertodt/stable-vec"
license = "MIT/Apache-2.0"
keywords = ["stable", "vec", "vector", "index", "option"]
categories = ["data-structures", "no-std"]
keywords = ["vector", "index", "option", "arena", "bitvec"]
categories = ["data-structures", "memory-management", "no-std"]
readme = "README.md"

[badges]
Expand Down
14 changes: 7 additions & 7 deletions benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ fn sum(c: &mut Criterion) {
"sum_full",
move |b, &len| {
let sv = full_sv(len);
b.iter(|| sv.iter().map(|&e| e as u64).sum::<u64>());
b.iter(|| sv.values().map(|&e| e as u64).sum::<u64>());
},
vec![0, 1, 10, 1000, 100_000],
);
Expand All @@ -268,7 +268,7 @@ fn sum(c: &mut Criterion) {
"sum_with_one_hole",
move |b, &len| {
let sv = sv_with_hole_in_middle(len);
b.iter(|| sv.iter().map(|&e| e as u64).sum::<u64>());
b.iter(|| sv.values().map(|&e| e as u64).sum::<u64>());
},
vec![10, 1000, 100_000],
);
Expand All @@ -277,7 +277,7 @@ fn sum(c: &mut Criterion) {
"sum_with_hole_every_fifth",
move |b, &len| {
let sv = sv_with_hole_every_fifth(len);
b.iter(|| sv.iter().map(|&e| e as u64).sum::<u64>());
b.iter(|| sv.values().map(|&e| e as u64).sum::<u64>());
},
vec![10, 1000, 100_000],
);
Expand All @@ -286,7 +286,7 @@ fn sum(c: &mut Criterion) {
"sum_with_element_every_fifth",
move |b, &len| {
let sv = sv_with_element_every_fifth(len);
b.iter(|| sv.iter().map(|&e| e as u64).sum::<u64>());
b.iter(|| sv.values().map(|&e| e as u64).sum::<u64>());
},
vec![10, 1000, 100_000],
);
Expand All @@ -295,7 +295,7 @@ fn sum(c: &mut Criterion) {
"sum_with_prime_holes",
move |b, &len| {
let sv = sv_with_prime_holes(len);
b.iter(|| sv.iter().map(|&e| e as u64).sum::<u64>());
b.iter(|| sv.values().map(|&e| e as u64).sum::<u64>());
},
vec![10, 1000, 100_000],
);
Expand All @@ -304,7 +304,7 @@ fn sum(c: &mut Criterion) {
"sum_two_elements",
move |b, &len| {
let sv = two_element_sv(len);
b.iter(|| sv.iter().map(|&e| e as u64).sum::<u64>());
b.iter(|| sv.values().map(|&e| e as u64).sum::<u64>());
},
vec![10, 1000, 100_000],
);
Expand All @@ -313,7 +313,7 @@ fn sum(c: &mut Criterion) {
"sum_fully_deleted",
move |b, &len| {
let sv = fully_deleted_sv(len);
b.iter(|| sv.iter().map(|&e| e as u64).sum::<u64>());
b.iter(|| sv.values().map(|&e| e as u64).sum::<u64>());
},
vec![10, 1000, 100_000],
);
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
//!
//! # How?
//!
//! Actually, the implementation of this stable vector is rather simple. We can
//! trade O(1) deletions and stable indices for a higher memory consumption.
//! We can trade O(1) deletions and stable indices for a higher memory
//! consumption.
//!
//! When `StableVec::remove()` is called, the element is just marked as
//! "deleted" (and the actual element is dropped), but other than that, nothing
Expand Down Expand Up @@ -199,7 +199,7 @@ pub type ExternStableVec<T> = StableVecFacade<T, BitVecCore<T>>;
///
/// # Implemented traits
///
/// This type implement a couple of traits. Some of those implementations
/// This type implements a couple of traits. Some of those implementations
/// require further explanation:
///
/// - `Clone`: the cloned instance is exactly the same as the original,
Expand Down

0 comments on commit 1c7ad55

Please sign in to comment.