Skip to content

Commit

Permalink
Merge pull request #7 from popzxc/update-md
Browse files Browse the repository at this point in the history
Update notes on performance
  • Loading branch information
popzxc authored Jun 11, 2021
2 parents 4512d04 + e039c9d commit b2a1a36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions BENCHES.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Time taken: 1.108587 seconds (3608196 msg/second)
### `messages`

`cargo run --release --example 04_ring -- 2000 2000`
Time taken: 1.281294 seconds (3121844 msg/second)
Time taken: 0.940551 seconds (4252826 msg/second)

## Operations benchmark

Expand All @@ -54,16 +54,16 @@ Below you can find results for common operations of `messages`.
### `message` operations

**Spawn**
time: [1.3994 us **1.4246 us** 1.4495 us]
thrpt: [689.87 Kelem/s **701.93 Kelem/s** 714.57 Kelem/s]
time: [1.3477 us **1.3814 us** 1.4149 us]
thrpt: [706.78 Kelem/s **723.92 Kelem/s** 741.99 Kelem/s]

**Send message**
time: [20.832 us **20.932 us** 21.041 us]
thrpt: [47.525 Kelem/s **47.773 Kelem/s** 48.004 Kelem/s]
**Send message**
time: [19.788 us **19.992 us** 20.255 us]
thrpt: [49.371 Kelem/s **50.019 Kelem/s** 50.535 Kelem/s]

**Notify**
time: [450.44 ns **455.79 ns** 461.31 ns]
thrpt: [2.1678 Melem/s **2.1940 Melem/s** 2.2200 Melem/s]
time: [75.169 ns **76.816 ns** 78.467 ns]
thrpt: [12.744 Melem/s **13.018 Melem/s** 13.303 Melem/s]


### Raw channels
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ actor spawning).
## Key features

- Full runtime independence. Can be used with any possible runtime that can spawn futures.
- Low dependencies amount. 2 mandatory dependencies and up to 1 optional runtime dependency.
- Low dependencies amount.
- Low amount of boilerplate without derive macros.
- Good performance (close to raw channels).
- Relevant (but sufficient) functionality only.
Expand Down Expand Up @@ -62,14 +62,14 @@ more bloated. If synchronous actor interface is preferred, consider using `actix

## Performance

TL;DR: This library provides performance slightly worse that either `actix` (for asynchronous message handling)
and raw channels, but not much.
TL;DR: This library provides performance that is better than in `actix` (for **asynchronous** message handling;
based on the ring benchmark used by `actix` itself) and is tied up to using `futures` channels.

More details are presented in the [BENCHES.md](./BENCHES.md).

*Note:* `messages` treats `async` and multi-threaded context as its main environment,
thus it may be less suitable (or, more precisely, less efficient) for the partially
sync context.
sync context. For instance, the sync version of the ring benchmark is by 80% faster than this library.

## Examples

Expand Down

0 comments on commit b2a1a36

Please sign in to comment.