diff options
| author | bors <bors@rust-lang.org> | 2013-12-17 01:16:43 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-12-17 01:16:43 -0800 |
| commit | 47c9a35747e9a15830e35924429050b820825f5d (patch) | |
| tree | 51c4caf9e358ecdab5a0dbba70ecf8fe4dc1ba11 /src/rustllvm/RustWrapper.cpp | |
| parent | 2c41a823ccb1e7cea0a29f9048533aaa78c40de6 (diff) | |
| parent | 39a6c9d6376f96cc8b905f00b88d20e42961206c (diff) | |
| download | rust-47c9a35747e9a15830e35924429050b820825f5d.tar.gz rust-47c9a35747e9a15830e35924429050b820825f5d.zip | |
auto merge of #10830 : alexcrichton/rust/spsc-queue, r=brson
This pull request completely rewrites std::comm and all associated users. Some major bullet points
* Everything now works natively
* oneshots have been removed
* shared ports have been removed
* try_recv no longer blocks (recv_opt blocks)
* constructors are now Chan::new and SharedChan::new
* failure is propagated on send
* stream channels are 3x faster
I have acquired the following measurements on this patch. I compared against Go, but remember that Go's channels are fundamentally different than ours in that sends are by-default blocking. This means that it's not really a totally fair comparison, but it's good to see ballpark numbers for anyway
```
oneshot stream shared1
std 2.111 3.073 1.730
my 6.639 1.037 1.238
native 5.748 1.017 1.250
go8 1.774 3.575 2.948
go8-inf slow 0.837 1.376
go8-128 4.832 1.430 1.504
go1 1.528 1.439 1.251
go2 1.753 3.845 3.166
```
I had three benchmarks:
* oneshot - N times, create a "oneshot channel", send on it, then receive on it (no task spawning)
* stream - N times, send from one task to another task, wait for both to complete
* shared1 - create N threads, each of which sends M times, and a port receives N*M times.
The rows are as follows:
* `std` - the current libstd implementation (before this pull request)
* `my` - this pull request's implementation (in M:N mode)
* `native` - this pull request's implementation (in 1:1 mode)
* `goN` - go's implementation with GOMAXPROCS=N. The only relevant value is 8 (I had 8 cores on this machine)
* `goN-X` - go's implementation where the channels in question were created with buffers of size `X` to behave more similarly to rust's channels.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
