• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

rayonパッケージ


RSS
Rev. Time Author
5611490 2019-02-26 07:45:52 Josh Stone

cargo fmt

6f53ec1 2019-02-20 04:22:49 bors[bot]

Merge #637

637: #[allow(deprecated)] impl Default for Configuration r=cuviper a=cuviper

Using `#[derive(Default)]` started triggering `Configuration`'s own
deprecation message on nightly, as it has been on our compat 1.13 as
well (though stable has been fine). We can easily `#[allow(deprecated)]`
on a manual `impl` to avoid this.

Co-authored-by: Josh Stone <cuviper@gmail.com>

a0be729 2019-02-20 04:19:03 Josh Stone

#[allow(deprecated)] impl Default for Configuration

Using `#[derive(Default)]` started triggering `Configuration`'s own
deprecation message on nightly, as it has been on our compat 1.13 as
well (though stable has been fine). We can easily `#[allow(deprecated)]`
on a manual `impl` to avoid this.

abd942e 2019-02-19 10:32:47 bors[bot]

Merge #627 #633

627: Add `find_map` with `any`, `first`, and `last` variants r=cuviper a=seanchen1991

PR opened in response to #607.

633: Update dev and demo dependencies r=cuviper a=cuviper

- `cgmath 0.17`
- `glium 0.23`
- `rand 0.6`

Co-authored-by: Sean <seanchen11235@gmail.com>
Co-authored-by: Josh Stone <cuviper@gmail.com>

8fbb588 2019-02-19 09:18:39 Sean

Add find_map variants

Add non-working test for find_map_first

Got find_map_first test compiling

Get first test passing

Remove unused file

Need to write more comprehensive tests

Add tests for find_map_any

Add last newline back to find_first_last

502c929 2019-02-19 09:11:43 bors[bot]

Merge #635

635: Allow the deprecated ATOMIC_USIZE_INIT r=cuviper a=cuviper

Nightly 1.34 suggests the const `AtomicUsize::new()` instead, but we
still want to support older compilers, so just allow it for now.

Co-authored-by: Josh Stone <cuviper@gmail.com>

baa8b65 2019-02-19 03:45:40 Josh Stone

cargo fmt (more semicolons in 1.32)

8237b0f 2019-02-19 01:59:10 bors[bot]

Merge #631

631: Specialize more `consume_iter`s r=cuviper a=huonw

This specializes the remaining "obvious" `consume_iter`s for the second part of #465. Benchmarks are included in each commit (the first specializes the types that can just defer to a `std` API, the second two require a bit more work); summary (on a 6 core/12 thread machine):

- on the included benchmarks:
- `find` is up to 1.5x faster (`find::size1::parallel_find_middle`)
- `collect` is up to 4x faster (`vec_collect::vec_i_filtered::with_collect`)
- using basic program that does something like `(0..std::u32::MAX).into_par_iter().<OPERATION>.map(test::black_box).count()`
- with no operation (i.e. just testing `map`/`count`): 8x faster
- with `.map(Some).while_some()`: 3x faster
- with `.intersperse(1)`: 10x faster

The remaining types without a specialization are:

```
$ rg --files-with-matches 'fn consume' src/iter | xargs rg --files-without-match 'fn consume_iter'
src/iter/filter_map.rs
src/iter/unzip.rs
src/iter/try_fold.rs
src/iter/try_reduce_with.rs
src/iter/try_reduce.rs
src/iter/filter.rs
src/iter/flat_map.rs
src/iter/find_first_last/mod.rs
src/iter/collect/consumer.rs
```

(I've started a WIP branch for the `try_*` types at https://github.com/huonw/rayon/tree/try_fold; diff to this PR: https://github.com/huonw/rayon/compare/iter-opts...try_fold.)



Co-authored-by: Huon Wilson <wilson.huon@gmail.com>

0dbc892 2019-02-18 12:26:48 Huon Wilson

Run rustfmt on new `consume_iter`s.

fbf99e4 2019-02-15 05:20:09 Josh Stone

Allow the deprecated ATOMIC_USIZE_INIT

Nightly 1.34 suggests the const `AtomicUsize::new()` instead, but we
still want to support older compilers, so just allow it for now.

a346bf0 2019-02-14 19:52:12 Huon Wilson

Check full in `fold` & `find_any` `consume_iter`, remove for `filter*`

These adaptors consume may many elements before deferring to a base
folder's fullness checks, and so they need to be performed
manually. For the `filter`s, there's no way to do it manually (#632),
so the specialisations just have to be removed. For `fold` and
`find_any` this can be done with a `take_while`.

This extends the octillion tests to confirm this behaviour.

This makes a program like the following slightly slower compared to
the direct `consume_iter` without a check, but it's still faster than
the non-specialized form.

```
extern crate test;
extern crate rayon;
use rayon::prelude::*;

fn main() {
let count = (0..std::u32::MAX)
.into_par_iter()
.map(test::black_box)
.find_any(|_| test::black_box(false));
println!("{:?}", count);
}
```

```
$ hyperfine ./find-original ./find-no-check ./find-check
Benchmark #1: ./find-original
Time (mean ± σ): 627.6 ms ± 25.7 ms [User: 7.130 s, System: 0.014 s]
Range (min … max): 588.4 ms … 656.4 ms 10 runs

Benchmark #2: ./find-no-check
Time (mean ± σ): 481.5 ms ± 10.8 ms [User: 5.415 s, System: 0.013 s]
Range (min … max): 468.9 ms … 498.2 ms 10 runs

Benchmark #3: ./find-check
Time (mean ± σ): 562.3 ms ± 11.8 ms [User: 6.363 s, System: 0.013 s]
Range (min … max): 542.5 ms … 578.2 ms 10 runs
```

(find-original = without specialization, find-no-check = custom
`consume_iter` without `take_while`, find-check = this commit)

d2609d8 2019-02-13 09:41:44 Josh Stone

Update dev and demo dependencies

- `cgmath 0.17`
- `glium 0.23`
- `rand 0.6`

cabe301 2019-02-04 06:38:08 Huon Wilson

Specialize `consume_iter` for `IntersperseFolder`

Part of #465.

This makes the following program 10x faster (5.7s before, 0.55s after)
on a 6 core (12 thread) machine.

```
extern crate test;
extern crate rayon;
use rayon::prelude::*;

fn main() {
let count = (0..std::u32::MAX)
.into_par_iter()
.intersperse(1)
.map(test::black_box)
.count();
println!("{}", count);
}
```

dd70530 2019-02-04 06:38:08 Huon Wilson

Specialize `consume_iter` for `WhileSomeFolder`

Part of #465.

This makes the following program 3x faster (1.2s before, 0.4s after)
on a 6 core (12 thread) machine.

```rust
extern crate test;
extern crate rayon;
use rayon::prelude::*;

fn main() {
let count = (0..std::u32::MAX)
.into_par_iter()
.map(Some)
.while_some()
.map(test::black_box)
.count();
println!("{}", count);
}
```

6879a4c 2019-02-03 22:42:02 Huon Wilson

Specialize `consume_iter` for simple std::iter-like consumers

These consumers all exist as std::iter adaptors too (except for
`update`, but that one is very simple), and so we can specialize
`consume_iter` to call them, to potentially benefit from any internal
iteration optimizations they have.

Part of #465.

The following example gets 8x faster (1.6s before, 0.2s after), on
a 6 core (12 threads) machine:

```

extern crate test;
extern crate rayon;
use rayon::prelude::*;

fn main() {
let count = (0..std::u32::MAX).into_par_iter().map(test::black_box).count();
println!("{}", count);
}
```

For the built-in benchmarks, there doesn't seem to be any true
slow-downs (some benchmarks are so variable that it's very hard to
accurately determine the change), and a lot of speed-ups. This affects
the `find` and `collect` benchmarks the most:

```
name find-old.txt ns/iter find-new.txt ns/iter diff ns/iter diff % speedup
find::size1::parallel_find_first 19,329 20,003 674 3.49% x 0.97
find::size1::parallel_find_common 24,328 23,183 -1,145 -4.71% x 1.05
find::size1::parallel_find_missing 2,131,717 1,687,769 -443,948 -20.83% x 1.26
find::size1::parallel_find_last 1,606,984 1,201,934 -405,050 -25.21% x 1.34
find::size1::parallel_find_middle 1,242,411 819,751 -422,660 -34.02% x 1.52
```

```
name collect-old.txt ns/iter collect-new.txt ns/iter diff ns/iter diff % speedup
map_collect::i_to_i::with_mutex_vec 30,813,044 31,650,037 836,993 2.72% x 0.97
map_collect::i_to_i::with_linked_list_collect_vec_sized 12,769,089 13,077,052 307,963 2.41% x 0.98
map_collect::i_mod_10_to_i::with_mutex_vec 8,222,478 8,316,029 93,551 1.14% x 0.99
map_collect::i_to_i::with_fold 49,522,357 49,662,761 140,404 0.28% x 1.00
map_collect::i_to_i::with_linked_list_collect 31,901,399 31,558,372 -343,027 -1.08% x 1.01
map_collect::i_mod_10_to_i::with_linked_list_collect 21,974,395 21,622,942 -351,453 -1.60% x 1.02
vec_collect::vec_i::with_fold 35,716,513 34,863,214 -853,299 -2.39% x 1.02
map_collect::i_to_i::with_fold_vec 51,523,306 50,049,271 -1,474,035 -2.86% x 1.03
map_collect::i_to_i::with_linked_list_collect_vec 23,086,079 22,443,957 -642,122 -2.78% x 1.03
map_collect::i_mod_10_to_i::with_mutex 80,962,611 77,863,092 -3,099,519 -3.83% x 1.04
map_collect::i_to_i::with_mutex 204,617,301 196,787,223 -7,830,078 -3.83% x 1.04
vec_collect::vec_i::with_collect 2,535,582 2,437,613 -97,969 -3.86% x 1.04
vec_collect::vec_i::with_collect_into_vec 2,665,272 2,531,158 -134,114 -5.03% x 1.05
map_collect::i_to_i::with_vec_vec_sized 14,525,832 13,627,798 -898,034 -6.18% x 1.07
vec_collect::vec_i::with_collect_into_vec_reused 1,227,069 1,109,099 -117,970 -9.61% x 1.11
vec_collect::vec_i_filtered::with_fold 41,675,555 36,487,521 -5,188,034 -12.45% x 1.14
map_collect::i_mod_10_to_i::with_collect 6,068,716 5,130,790 -937,926 -15.46% x 1.18
map_collect::i_mod_10_to_i::with_vec_vec_sized 6,249,221 5,276,541 -972,680 -15.56% x 1.18
map_collect::i_mod_10_to_i::with_linked_list_collect_vec 5,996,844 5,026,503 -970,341 -16.18% x 1.19
map_collect::i_mod_10_to_i::with_linked_list_map_reduce_vec_sized 5,897,802 4,976,394 -921,408 -15.62% x 1.19
map_collect::i_to_i::with_collect 14,137,451 11,812,855 -2,324,596 -16.44% x 1.20
map_collect::i_mod_10_to_i::with_linked_list_collect_vec_sized 6,187,408 4,996,645 -1,190,763 -19.24% x 1.24
map_collect::i_to_i::with_linked_list_map_reduce_vec_sized 14,489,709 11,024,575 -3,465,134 -23.91% x 1.31
map_collect::i_mod_10_to_i::with_fold 1,690,818 1,265,901 -424,917 -25.13% x 1.34
vec_collect::vec_i::with_linked_list_collect_vec 23,295,026 16,697,819 -6,597,207 -28.32% x 1.40
map_collect::i_mod_10_to_i::with_fold_vec 2,652,629 1,707,870 -944,759 -35.62% x 1.55
vec_collect::vec_i::with_linked_list_map_reduce_vec_sized 14,930,174 9,183,037 -5,747,137 -38.49% x 1.63
vec_collect::vec_i::with_vec_vec_sized 15,782,752 9,705,671 -6,077,081 -38.50% x 1.63
vec_collect::vec_i_filtered::with_linked_list_collect_vec 30,026,717 18,254,188 -11,772,529 -39.21% x 1.64
vec_collect::vec_i::with_linked_list_collect_vec_sized 15,408,185 8,607,308 -6,800,877 -44.14% x 1.79
vec_collect::vec_i_filtered::with_vec_vec_sized 22,714,855 9,594,991 -13,119,864 -57.76% x 2.37
vec_collect::vec_i_filtered::with_linked_list_map_reduce_vec_sized 23,022,071 9,483,549 -13,538,522 -58.81% x 2.43
vec_collect::vec_i_filtered::with_linked_list_collect_vec_sized 23,143,333 9,342,023 -13,801,310 -59.63% x 2.48
vec_collect::vec_i_filtered::with_collect 24,671,619 6,026,401 -18,645,218 -75.57% x 4.09
```

b4553ab 2019-02-02 14:17:57 bors[bot]

Merge #615

615: Implement RFC #1: FIFO spawns r=nikomatsakis a=cuviper

This implements rayon-rs/rfcs#1, adding `spawn_fifo`, `scope_fifo`, and `ScopeFifo`, and deprecating the `breadth_first` flag.

Fixes #590.
Closes #601.

Co-authored-by: Josh Stone <cuviper@gmail.com>

88d6a4e 2019-02-02 14:10:52 Josh Stone

Correct the comment labeling task s.2

552fc11 2019-01-31 04:56:22 Josh Stone

Document `ThreadPool::spawn_fifo`

e431b4b 2019-01-31 04:53:47 Josh Stone

Document the global `spawn_fifo`

e047db6 2019-01-31 04:48:33 Josh Stone

Document `ScopeFifo::spawn_fifo`

2f5310b 2019-01-31 04:25:58 Josh Stone

Document the global `scope_fifo`

346bcdf 2019-01-19 14:09:03 bors[bot]

Merge #623

623: Filtermap test use sum r=cuviper a=seanchen1991

The `filter_map` test collects the parallel iterator using `sum`, but it collects the sequential iterator using `fold`. These should probably be brought to parity with each other, unless there's some rationale with using `fold` on the sequential iterator that I'm not seeing.

Also a few typo fixes in READMEs that I corrected locally a while ago. If it's preferable that I submit a separate PR for those, I'm happy to do so.

Co-authored-by: Sean <seanchen11235@gmail.com>

93331b4 2019-01-19 13:42:25 Sean

Add final newline back in iter/test.rs

955de12 2019-01-14 07:51:48 Sean

Change filtermap test to use sum instead of fold

9fe771d 2019-01-13 14:50:16 Sean

Merge branch 'master' of https://github.com/rayon-rs/rayon

b84a662 2019-01-10 07:03:21 bors[bot]

Merge #617

617: Handle the last chunk correctly r=nikomatsakis a=yegeun542

Minor change in ChunksMutProducer. `split_at` function currently panics when the last chunk is shorter than the other chunks.

Co-authored-by: yyang542 <yyang542@wisc.edu>
Co-authored-by: Josh Stone <cuviper@gmail.com>

b6cc1c9 2019-01-05 04:29:09 Josh Stone

Test a variety of chunk producer splits

edaf851 2019-01-05 04:28:16 Josh Stone

Fix the end split of ChunksProducer too

35c032c 2018-12-31 07:41:37 Josh Stone

Rename ScopeFifo::spawn to spawn_fifo

8d8925b 2018-12-31 07:41:37 Josh Stone

Make ThreadPool::spawn_fifo() actually FIFO