Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit d0e7915

Browse files
committed
Release 0.5.0, deprecated
1 parent c00f3e1 commit d0e7915

File tree

4 files changed

+37
-14
lines changed

4 files changed

+37
-14
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sudo: false
44
matrix:
55
fast_finish: true
66
include:
7-
- rust: 1.28.0
7+
- rust: 1.31.0
88
- rust: stable
99
- rust: beta
1010
- rust: nightly

Cargo.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
authors = ["Josh Stone <[email protected]>"]
33
name = "rayon-hash"
4-
version = "0.4.1"
4+
version = "0.5.0"
55
repository = "https://github.com/rayon-rs/rayon-hash"
66
documentation = "https://docs.rs/rayon-hash/"
77
keywords = ["parallel", "iterator", "hash", "map", "set"]
88
categories = ["concurrency", "data-structures"]
9-
description = "HashMap and HashSet with support for Rayon parallel iterators"
9+
description = "(deprecated) HashMap and HashSet with support for Rayon parallel iterators"
1010
license = "Apache-2.0/MIT"
1111
readme = "README.md"
1212
edition = "2018"
@@ -17,3 +17,10 @@ rayon = "1.0"
1717
[dev-dependencies]
1818
rand = "0.6"
1919
rand_xorshift = "0.1"
20+
21+
[dev-dependencies.hashbrown]
22+
version = "0.3.0"
23+
features = ["rayon"]
24+
25+
[badges]
26+
maintenance = { status = "deprecated" }

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,35 @@
33
[![rayon-hash crate](https://img.shields.io/crates/v/rayon-hash.svg)](https://crates.io/crates/rayon-hash)
44
[![rayon-hash documentation](https://docs.rs/rayon-hash/badge.svg)](https://docs.rs/rayon-hash)
55
[![Travis Status](https://travis-ci.org/rayon-rs/rayon-hash.svg?branch=master)](https://travis-ci.org/rayon-rs/rayon-hash)
6+
![deprecated](https://img.shields.io/badge/maintenance-deprecated-red.svg)
67

7-
The `rayon-hash` crate duplicates the standard `HashMap` and `HashSet`, adding
8-
native support for Rayon parallel iterators.
8+
This crate is now **deprecated**, because the [new implementation in `std`]
9+
also exists as the [`hashbrown`] crate with its own "rayon" feature.
10+
11+
[new implementation in `std`]: https://github.com/rust-lang/rust/pull/58623
12+
[`hashbrown`]: https://crates.io/crates/hashbrown
13+
14+
The `rayon-hash` crate duplicates the _former_ standard `HashMap` and
15+
`HashSet`, adding native support for Rayon parallel iterators.
916

1017
Rayon does provide iterators for these standard types already, but since it
1118
can't access internal fields, it has to collect to an intermediate vector to be
1219
split into parallel jobs. With the custom types in `rayon-hash`, we can
1320
instead read the raw hash table directly, for much better performance.
1421

22+
Benchmarks using `rustc 1.36.0-nightly (e938c2b9a 2019-04-23)`, before the
23+
`hashbrown` implementation had merged into `std`:
24+
1525
```text
16-
test rayon_set_sum_parallel ... bench: 1,035,111 ns/iter (+/- 57,327)
17-
test rayon_set_sum_serial ... bench: 7,500,179 ns/iter (+/- 96,918)
18-
test std_set_sum_parallel ... bench: 6,799,231 ns/iter (+/- 94,154)
19-
test std_set_sum_serial ... bench: 7,634,174 ns/iter (+/- 84,806)
26+
test hashbrown_set_sum_parallel ... bench: 617,405 ns/iter (+/- 58,565)
27+
test hashbrown_set_sum_serial ... bench: 2,655,882 ns/iter (+/- 15,104)
28+
test rayon_hash_set_sum_parallel ... bench: 1,368,058 ns/iter (+/- 75,984)
29+
test rayon_hash_set_sum_serial ... bench: 7,558,175 ns/iter (+/- 190,545)
30+
test std_hash_set_sum_parallel ... bench: 6,869,490 ns/iter (+/- 47,897)
31+
test std_hash_set_sum_serial ... bench: 7,591,704 ns/iter (+/- 154,438)
2032
```
2133

22-
This crate currently requires `rustc 1.28.0` or greater.
34+
This crate currently requires `rustc 1.31.0` or greater.
2335

2436
## Known limitations
2537

benches/set_sum.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ extern crate rayon;
66
extern crate rayon_hash;
77
extern crate test;
88

9+
use hashbrown::HashSet as HashBrownSet;
910
use rand::distributions::Standard;
1011
use rand::{Rng, SeedableRng};
1112
use rand_xorshift::XorShiftRng;
1213
use rayon::prelude::*;
1314
use rayon_hash::HashSet as RayonHashSet;
1415
use std::collections::HashSet as StdHashSet;
16+
use std::collections::hash_map::RandomState;
1517
use std::iter::FromIterator;
1618
use test::Bencher;
1719

@@ -39,7 +41,9 @@ macro_rules! bench_set_sum {
3941
};
4042
}
4143

42-
bench_set_sum!{std_set_sum_serial, StdHashSet<_>, iter}
43-
bench_set_sum!{std_set_sum_parallel, StdHashSet<_>, par_iter}
44-
bench_set_sum!{rayon_set_sum_serial, RayonHashSet<_>, iter}
45-
bench_set_sum!{rayon_set_sum_parallel, RayonHashSet<_>, par_iter}
44+
bench_set_sum!{std_hash_set_sum_serial, StdHashSet<_, RandomState>, iter}
45+
bench_set_sum!{std_hash_set_sum_parallel, StdHashSet<_, RandomState>, par_iter}
46+
bench_set_sum!{rayon_hash_set_sum_serial, RayonHashSet<_, RandomState>, iter}
47+
bench_set_sum!{rayon_hash_set_sum_parallel, RayonHashSet<_, RandomState>, par_iter}
48+
bench_set_sum!{hashbrown_set_sum_serial, HashBrownSet<_, RandomState>, iter}
49+
bench_set_sum!{hashbrown_set_sum_parallel, HashBrownSet<_, RandomState>, par_iter}

0 commit comments

Comments
 (0)