rust/src/libextra
bors 6df66c194d auto merge of #7109 : bblum/rust/rwlocks, r=brson
r? @brson

links to issues: #7065 the race that's fixed; #7066 the perf improvement I added. There are also some minor cleanup commits here.

To measure the performance improvement from replacing the exclusive with an atomic uint, I edited the ```msgsend-ring-rw-arcs``` bench test to do a ```write_downgrade``` instead of just a ```write```, so that it stressed the code paths that accessed ```read_count```. (At first I was still using ```write``` and saw no performance difference whatsoever, whoooops.)

The bench test measures how long it takes to send 1,000,000 messages by using rwarcs to emulate pipes. I also measured the performance difference imposed by the fix to the ```access_lock``` race (which involves taking an extra semaphore in the ```cond.wait()``` path). The net result is that fixing the race imposes a 4% to 5% slowdown, but doing the atomic uint optimization gives a 6% to 8% speedup.

Note that this speedup will be most visible in read- or downgrade-heavy workloads. If an RWARC's only users are writers, the optimization doesn't matter. All the same, I think this more than justifies the extra complexity I mentioned in #7066.

The raw numbers are:
```
with xadd read count
        before write_cond fix
                4.18 to 4.26 us/message
        with write_cond fix
                4.35 to 4.39 us/message
                
with exclusive read count
        before write_cond fix
                4.41 to 4.47 us/message
        with write_cond fix
                4.65 to 4.76 us/message
```
2013-06-15 04:07:03 -07:00
..
num add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
terminfo auto merge of #7133 : kballard/rust/terminfo-parm, r=thestinger 2013-06-15 03:07:05 -07:00
arc.rs Improve comments in sync and arc a bit more. 2013-06-13 15:20:38 -04:00
arena.rs librustc: Disallow multiple patterns from appearing in a "let" declaration. 2013-06-04 21:45:42 -07:00
base64.rs std: unify the str -> [u8] functions as 3 methods: .as_bytes() and .as_bytes_with_null[_consume](). 2013-06-12 12:21:04 +10:00
bitv.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
c_vec.rs librustc: Stop reexporting the standard modules from prelude. 2013-05-29 19:04:53 -07:00
comm.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
dbg.rs libextra: Require documentation by default 2013-05-30 01:03:15 -05:00
deque.rs rm MutableIter 2013-06-14 23:15:42 -04:00
dlist.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
ebml.rs std: unify the str -> [u8] functions as 3 methods: .as_bytes() and .as_bytes_with_null[_consume](). 2013-06-12 12:21:04 +10:00
fileinput.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
flate.rs remove unused import warnings 2013-06-09 02:22:23 +10:00
flatpipes.rs Revert "std: convert {vec,str}::to_owned to methods." 2013-06-13 19:06:47 -07:00
fun_treemap.rs Remove copy bindings from patterns. 2013-05-30 15:20:36 -04:00
future.rs std::cell: Modernize constructors 2013-06-04 12:03:58 +02:00
getopts.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
io_util.rs libextra: Require documentation by default 2013-05-30 01:03:15 -05:00
json.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
list.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
md4.rs Revert "std: convert {vec,str}::to_owned to methods." 2013-06-13 19:06:47 -07:00
net.rs libstd: Rename libcore to libstd and libstd to libextra; update makefiles. 2013-05-22 21:57:05 -07:00
net_ip.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
net_tcp.rs std: unify the str -> [u8] functions as 3 methods: .as_bytes() and .as_bytes_with_null[_consume](). 2013-06-12 12:21:04 +10:00
net_url.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
par.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
priority_queue.rs cmp: remove duplicate free functions 2013-06-09 20:47:40 -04:00
rc.rs std::cell: Modernize constructors 2013-06-04 12:03:58 +02:00
rl.rs librustc: Stop reexporting the standard modules from prelude. 2013-05-29 19:04:53 -07:00
rope.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
semver.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
serialize.rs Implement unimplemented methods in ebml 2013-05-31 00:28:17 -05:00
sha1.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
smallintmap.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
sort.rs remove deprecated vec::{is_empty, len} functions 2013-06-08 23:19:30 -04:00
stats.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
std.rc remove unused import warnings 2013-06-09 02:22:23 +10:00
sync.rs Improve comments in sync and arc a bit more. 2013-06-13 15:20:38 -04:00
task_pool.rs Remove all uses of pub impl. rs=style 2013-06-01 09:18:27 -07:00
tempfile.rs std: replace str::{starts,ends}_with with the method. 2013-06-11 01:03:24 +10:00
term.rs Fix line lengths in terminfo 2013-06-14 13:03:42 -07:00
test.rs std: remove str::contains in favour of the method 2013-06-10 23:02:55 +10:00
time.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
timer.rs Remove 'this could be clearer' FIXME. Looks fine. Close #2618. 2013-06-10 17:51:02 -04:00
treemap.rs add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
unicode.rs libextra: Require documentation by default 2013-05-30 01:03:15 -05:00
uv.rs libstd: Rename libcore to libstd and libstd to libextra; update makefiles. 2013-05-22 21:57:05 -07:00
uv_global_loop.rs Remove unnecessary 'use' forms 2013-05-30 13:08:18 -07:00
uv_iotask.rs libextra: Require documentation by default 2013-05-30 01:03:15 -05:00
uv_ll.rs std: unify the str -> [u8] functions as 3 methods: .as_bytes() and .as_bytes_with_null[_consume](). 2013-06-12 12:21:04 +10:00
workcache.rs std::cell: Modernize constructors 2013-06-04 12:03:58 +02:00