Skip to content

Commit 3056ee9

Browse files
committed
Auto merge of #434 - Amanieu:release-0.14.0, r=Amanieu
Prepare release of v0.14.0 See the changelog for highlights.
2 parents 3784c2f + 32b125e commit 3056ee9

File tree

3 files changed

+65
-41
lines changed

3 files changed

+65
-41
lines changed

CHANGELOG.md

+28-5
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.14.0] - 2023-06-01
11+
1012
### Added
1113

1214
- Support for `allocator-api2` crate
13-
for interfacing with custom allocators on stable.
15+
for interfacing with custom allocators on stable. (#417)
16+
- Optimized implementation for ARM using NEON instructions. (#430)
17+
- Support for rkyv serialization. (#432)
18+
- `Equivalent` trait to look up values without `Borrow`. (#345)
19+
- `Hash{Map,Set}::raw_table_mut` is added whic returns a mutable reference. (#404)
20+
- Fast path for `clear` on empty tables. (#428)
1421

1522
### Changed
1623

17-
- Bumped MSRV to 1.63.0.
24+
- Optimized insertion to only perform a single lookup. (#277)
25+
- `DrainFilter` has been renamed to `ExtractIf` and no longer drops remaining
26+
elements when the iterator is dropped. #(374)
27+
- Bumped MSRV to 1.64.0. (#431)
28+
- `{Map,Set}::raw_table` now returns an immutable reference. (#404)
29+
- `VacantEntry` and `OccupiedEntry` now use the default hasher if none is
30+
specified in generics. (#389)
31+
- `RawTable::data_start` now returns a `NonNull` to match `RawTable::data_end`. (#387)
32+
- `RawIter::{reflect_insert, reflect_remove}` are now unsafe. (#429)
33+
- `RawTable::find_potential` is renamed to `find_or_find_insert_slot` and returns an `InsertSlot`. (#429)
34+
- `RawTable::remove` now also returns an `InsertSlot`. (#429)
35+
- `InsertSlot` can be used to insert an element with `RawTable::insert_in_slot`. (#429)
36+
- `RawIterHash` no longer has a lifetime tied to that of the `RawTable`. (#427)
37+
- The trait bounds of `HashSet::raw_table` have been relaxed to not require `Eq + Hash`. (#423)
38+
- `EntryRef::and_replace_entry_with` and `OccupiedEntryRef::replace_entry_with`
39+
were changed to give a `&K` instead of a `&Q` to the closure.
1840

1941
### Removed
2042

2143
- Support for `bumpalo` as an allocator with custom wrapper.
2244
Use `allocator-api2` feature in `bumpalo` to use it as an allocator
23-
for `hashbrown` collections.
45+
for `hashbrown` collections. (#417)
2446

2547
## [v0.13.2] - 2023-01-12
2648

@@ -263,7 +285,7 @@ This release was _yanked_ due to inconsistent hashes being generated with the `n
263285
## [v0.6.2] - 2019-10-23
264286

265287
### Added
266-
- Added an `inline-more` feature (enabled by default) which allows choosing a tradeoff between
288+
- Added an `inline-more` feature (enabled by default) which allows choosing a tradeoff between
267289
runtime performance and compilation time. (#119)
268290

269291
## [v0.6.1] - 2019-10-04
@@ -411,7 +433,8 @@ This release was _yanked_ due to a breaking change for users of `no-default-feat
411433

412434
- Initial release
413435

414-
[Unreleased]: https://github.com/rust-lang/hashbrown/compare/v0.13.2...HEAD
436+
[Unreleased]: https://github.com/rust-lang/hashbrown/compare/v0.14.0...HEAD
437+
[v0.14.0]: https://github.com/rust-lang/hashbrown/compare/v0.13.2...v0.14.0
415438
[v0.13.2]: https://github.com/rust-lang/hashbrown/compare/v0.13.1...v0.13.2
416439
[v0.13.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.3...v0.13.1
417440
[v0.12.3]: https://github.com/rust-lang/hashbrown/compare/v0.12.2...v0.12.3

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hashbrown"
3-
version = "0.13.2"
3+
version = "0.14.0"
44
authors = ["Amanieu d'Antras <[email protected]>"]
55
description = "A Rust port of Google's SwissTable hash map"
66
license = "MIT OR Apache-2.0"

README.md

+36-35
Original file line numberDiff line numberDiff line change
@@ -40,52 +40,52 @@ Compared to the previous implementation of `std::collections::HashMap` (Rust 1.3
4040

4141
With the hashbrown default AHash hasher:
4242

43-
| name | oldstdhash ns/iter | hashbrown ns/iter | diff ns/iter | diff % | speedup |
44-
|:------------------------|:-------------------:|------------------:|:------------:|---------:|---------|
45-
| insert_ahash_highbits | 18,865 | 8,020 | -10,845 | -57.49% | x 2.35 |
46-
| insert_ahash_random | 19,711 | 8,019 | -11,692 | -59.32% | x 2.46 |
47-
| insert_ahash_serial | 19,365 | 6,463 | -12,902 | -66.63% | x 3.00 |
48-
| insert_erase_ahash_highbits | 51,136 | 17,916 | -33,220 | -64.96% | x 2.85 |
49-
| insert_erase_ahash_random | 51,157 | 17,688 | -33,469 | -65.42% | x 2.89 |
50-
| insert_erase_ahash_serial | 45,479 | 14,895 | -30,584 | -67.25% | x 3.05 |
51-
| iter_ahash_highbits | 1,399 | 1,092 | -307 | -21.94% | x 1.28 |
52-
| iter_ahash_random | 1,586 | 1,059 | -527 | -33.23% | x 1.50 |
53-
| iter_ahash_serial | 3,168 | 1,079 | -2,089 | -65.94% | x 2.94 |
54-
| lookup_ahash_highbits | 32,351 | 4,792 | -27,559 | -85.19% | x 6.75 |
55-
| lookup_ahash_random | 17,419 | 4,817 | -12,602 | -72.35% | x 3.62 |
56-
| lookup_ahash_serial | 15,254 | 3,606 | -11,648 | -76.36% | x 4.23 |
57-
| lookup_fail_ahash_highbits | 21,187 | 4,369 | -16,818 | -79.38% | x 4.85 |
58-
| lookup_fail_ahash_random | 21,550 | 4,395 | -17,155 | -79.61% | x 4.90 |
59-
| lookup_fail_ahash_serial | 19,450 | 3,176 | -16,274 | -83.67% | x 6.12 |
43+
| name | oldstdhash ns/iter | hashbrown ns/iter | diff ns/iter | diff % | speedup |
44+
| :-------------------------- | :----------------: | ----------------: | :----------: | ------: | ------- |
45+
| insert_ahash_highbits | 18,865 | 8,020 | -10,845 | -57.49% | x 2.35 |
46+
| insert_ahash_random | 19,711 | 8,019 | -11,692 | -59.32% | x 2.46 |
47+
| insert_ahash_serial | 19,365 | 6,463 | -12,902 | -66.63% | x 3.00 |
48+
| insert_erase_ahash_highbits | 51,136 | 17,916 | -33,220 | -64.96% | x 2.85 |
49+
| insert_erase_ahash_random | 51,157 | 17,688 | -33,469 | -65.42% | x 2.89 |
50+
| insert_erase_ahash_serial | 45,479 | 14,895 | -30,584 | -67.25% | x 3.05 |
51+
| iter_ahash_highbits | 1,399 | 1,092 | -307 | -21.94% | x 1.28 |
52+
| iter_ahash_random | 1,586 | 1,059 | -527 | -33.23% | x 1.50 |
53+
| iter_ahash_serial | 3,168 | 1,079 | -2,089 | -65.94% | x 2.94 |
54+
| lookup_ahash_highbits | 32,351 | 4,792 | -27,559 | -85.19% | x 6.75 |
55+
| lookup_ahash_random | 17,419 | 4,817 | -12,602 | -72.35% | x 3.62 |
56+
| lookup_ahash_serial | 15,254 | 3,606 | -11,648 | -76.36% | x 4.23 |
57+
| lookup_fail_ahash_highbits | 21,187 | 4,369 | -16,818 | -79.38% | x 4.85 |
58+
| lookup_fail_ahash_random | 21,550 | 4,395 | -17,155 | -79.61% | x 4.90 |
59+
| lookup_fail_ahash_serial | 19,450 | 3,176 | -16,274 | -83.67% | x 6.12 |
6060

6161

6262
With the libstd default SipHash hasher:
6363

64-
|name | oldstdhash ns/iter | hashbrown ns/iter | diff ns/iter | diff % | speedup |
65-
|:------------------------|:-------------------:|------------------:|:------------:|---------:|---------|
66-
|insert_std_highbits |19,216 |16,885 | -2,331 | -12.13% | x 1.14 |
67-
|insert_std_random |19,179 |17,034 | -2,145 | -11.18% | x 1.13 |
68-
|insert_std_serial |19,462 |17,493 | -1,969 | -10.12% | x 1.11 |
69-
|insert_erase_std_highbits |50,825 |35,847 | -14,978 | -29.47% | x 1.42 |
70-
|insert_erase_std_random |51,448 |35,392 | -16,056 | -31.21% | x 1.45 |
71-
|insert_erase_std_serial |87,711 |38,091 | -49,620 | -56.57% | x 2.30 |
72-
|iter_std_highbits |1,378 |1,159 | -219 | -15.89% | x 1.19 |
73-
|iter_std_random |1,395 |1,132 | -263 | -18.85% | x 1.23 |
74-
|iter_std_serial |1,704 |1,105 | -599 | -35.15% | x 1.54 |
75-
|lookup_std_highbits |17,195 |13,642 | -3,553 | -20.66% | x 1.26 |
76-
|lookup_std_random |17,181 |13,773 | -3,408 | -19.84% | x 1.25 |
77-
|lookup_std_serial |15,483 |13,651 | -1,832 | -11.83% | x 1.13 |
78-
|lookup_fail_std_highbits |20,926 |13,474 | -7,452 | -35.61% | x 1.55 |
79-
|lookup_fail_std_random |21,766 |13,505 | -8,261 | -37.95% | x 1.61 |
80-
|lookup_fail_std_serial |19,336 |13,519 | -5,817 | -30.08% | x 1.43 |
64+
| name | oldstdhash ns/iter | hashbrown ns/iter | diff ns/iter | diff % | speedup |
65+
| :------------------------ | :----------------: | ----------------: | :----------: | ------: | ------- |
66+
| insert_std_highbits | 19,216 | 16,885 | -2,331 | -12.13% | x 1.14 |
67+
| insert_std_random | 19,179 | 17,034 | -2,145 | -11.18% | x 1.13 |
68+
| insert_std_serial | 19,462 | 17,493 | -1,969 | -10.12% | x 1.11 |
69+
| insert_erase_std_highbits | 50,825 | 35,847 | -14,978 | -29.47% | x 1.42 |
70+
| insert_erase_std_random | 51,448 | 35,392 | -16,056 | -31.21% | x 1.45 |
71+
| insert_erase_std_serial | 87,711 | 38,091 | -49,620 | -56.57% | x 2.30 |
72+
| iter_std_highbits | 1,378 | 1,159 | -219 | -15.89% | x 1.19 |
73+
| iter_std_random | 1,395 | 1,132 | -263 | -18.85% | x 1.23 |
74+
| iter_std_serial | 1,704 | 1,105 | -599 | -35.15% | x 1.54 |
75+
| lookup_std_highbits | 17,195 | 13,642 | -3,553 | -20.66% | x 1.26 |
76+
| lookup_std_random | 17,181 | 13,773 | -3,408 | -19.84% | x 1.25 |
77+
| lookup_std_serial | 15,483 | 13,651 | -1,832 | -11.83% | x 1.13 |
78+
| lookup_fail_std_highbits | 20,926 | 13,474 | -7,452 | -35.61% | x 1.55 |
79+
| lookup_fail_std_random | 21,766 | 13,505 | -8,261 | -37.95% | x 1.61 |
80+
| lookup_fail_std_serial | 19,336 | 13,519 | -5,817 | -30.08% | x 1.43 |
8181

8282
## Usage
8383

8484
Add this to your `Cargo.toml`:
8585

8686
```toml
8787
[dependencies]
88-
hashbrown = "0.13"
88+
hashbrown = "0.14"
8989
```
9090

9191
Then:
@@ -101,6 +101,7 @@ This crate has the following Cargo features:
101101

102102
- `nightly`: Enables nightly-only features including: `#[may_dangle]`.
103103
- `serde`: Enables serde serialization support.
104+
- `rkyv`: Enables rkyv serialization support.
104105
- `rayon`: Enables rayon parallel iterator support.
105106
- `raw`: Enables access to the experimental and unsafe `RawTable` API.
106107
- `inline-more`: Adds inline hints to most functions, improving run-time performance at the cost

0 commit comments

Comments
 (0)