From 5732dba3beda44dd23e64592d44e802adf6124a5 Mon Sep 17 00:00:00 2001 From: Cody Casterline Date: Sun, 18 Nov 2018 22:08:12 +0000 Subject: [PATCH] Release: v1.0.0 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ Cargo.toml | 2 +- README.md | 33 +++++++++++++++++++++++++++++---- src/lib.rs | 5 +++-- 4 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..720dc16 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +Changelog +========= + +v1.0.0 - November 18, 2018 +-------------------------- + + * Support for ordered mapping. Use `ordered_map()` if you need the order of + your outputs to match the order of their inputs. This adds a performance + penalty for the extra bookkeeping required. And you may see additional + performance loss due to head-of-line blocking, depending on your workload(s). + * Switched implementation to use crossbeam_channel, which greatly + [improves performance][1]. + * Shrank the API. `map()` and `ordered_map()` return `impl Iterator`, so we + no longer leak the internal `PipelineIter` type(s). + +[1]: https://github.com/NfNitLoop/pipeliner/commit/c8b23a04242d6eac91df424022f62a3074c31eb0 + + +v0.1.1 - December 5, 2016 +------------------------- + +Initial release. + + * Used std::sync::mpsc diff --git a/Cargo.toml b/Cargo.toml index b39e01b..c9b744b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pipeliner" -version = "0.1.1" +version = "1.0.0" authors = ["Cody Casterline "] license = "Apache-2.0" diff --git a/README.md b/README.md index 193023f..e66f9d5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,33 @@ Pipeliner ========= -Pipeliner is a Rust library which aims to simplify doing multi-threaded work -pipelines on iterators. +Pipeliner is a Rust library to help you create multithreaded work pipelines. You +can choose how many threads each step of the pipeline uses to tune performance +for I/O- or CPU-bound workloads. -Take a look at the code examples in the docs here: -https://docs.rs/pipeliner/ \ No newline at end of file +The [API docs] contain code examples. + +Links +----- + + * [API docs] + * [Changelog] + * [Pipeliner] crate on crates.io + +[API Docs]: https://docs.rs/pipeliner/ +[Changelog]: ./CHANGELOG.md +[Pipeliner]: https://crates.io/crates/pipeliner + +Comparison with Rayon +--------------------- + +[Rayon] is another Rust library for parallel computation. If you're doing purely +CPU-bound work, you may want to try that out to see if it offers better +performance. + +Pipeliner, IMHO, offers a simpler interface. That simpler interface makes it +easier to combine parts of a data pipeline that may be I/O-bound and CPU-bound. +Usually in those cases, your bottleneck is I/O, not the speed of your parallel +execution library, so having a nice API may be preferable. + +[Rayon]: https://crates.io/crates/rayon \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 277c1ea..5292480 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,11 +9,12 @@ //! * `panic`s in your worker threads are propagated out of the output //! Iterator. (No silent loss of data.) //! * No `unsafe` code. -//! -//! Since `IntoIterator`s implement [Pipeline], you can, for example: //! //! ``` +//! // Import the Pipeline trait to give all Iterators and IntoIterators the +//! // .with_threads() method: //! use pipeliner::Pipeline; +//! //! for result in (0..100).with_threads(10).map(|x| x + 1) { //! println!("result: {}", result); //! }