rust/src/libstd/rt
bors 72080954b9 auto merge of #8317 : bblum/rust/fast-spawn-unlinked, r=brson
This lazily initializes the taskgroup structs for ```spawn_unlinked``` tasks. If such a task never spawns another task linked to it (or a descendant of it), its taskgroup is simply never initialized at all. Also if an unlinked task spawns another unlinked task, neither of them will need to initialize their taskgroups. This works for the main task too.

I benchmarked this with the following test case and observed a ~~21% speedup (average over 4 runs: 7.85 sec -> 6.20 sec, 2.5 GHz)~~ 11% speedup, see comment below.
```
use std::task;
use std::cell::Cell;
use std::rt::comm;

static NUM: uint = 1024*256;

fn run(f: ~fn()) {
    let mut t = task::task();
    t.unlinked();
    t.spawn(f);
}

fn main() {
    do NUM.times {
        let (p,c) = comm::oneshot();
        let c = Cell::new(c);
        do run { c.take().send(()); }
        p.recv();
    }
}
```
2013-08-06 10:32:00 -07:00
..
io auto merge of #8313 : msullivan/rust/cleanup, r=catamorphism 2013-08-06 08:44:05 -07:00
uv Updated std::Option, std::Either and std::Result 2013-08-05 22:42:21 +02:00
args.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
borrowck.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
comm.rs Fix nasty double-free bug where a newrt chan could get killed after rescheduling but before suppressing_finalize. 2013-08-02 17:31:44 -04:00
context.rs A major refactoring that changes the way the runtime uses TLS. In the 2013-08-01 15:14:00 -07:00
env.rs
global_heap.rs Consolidate raw representations of rust values 2013-07-26 09:53:03 -07:00
kill.rs Lazily initialize 'leaf node' taskgroups for unlinked spawns, for an apparent 11% speedup. 2013-08-05 19:30:25 -04:00
local_heap.rs librustc: Disallow "unsafe" for external functions 2013-08-02 21:57:59 -07:00
local_ptr.rs std::rt: Improve the error message when the thread-local ptr is null 2013-08-04 15:11:55 -07:00
local.rs std::rt: Run the tests for Local in a bare thread 2013-08-04 15:11:56 -07:00
logging.rs std: Fix newsched logging truncation 2013-08-04 21:56:47 -07:00
message_queue.rs Change concurrency primitives to standard naming conventions 2013-07-27 22:06:29 -07:00
metrics.rs std::rt: Add JoinLatch 2013-06-13 23:18:45 -07:00
mod.rs Updated std::Option, std::Either and std::Result 2013-08-05 22:42:21 +02:00
rc.rs Change finalize -> drop. 2013-06-25 21:14:39 -04:00
rtio.rs Rename IpAddr -> SocketAddr, extract IpAddr from SocketAddr 2013-08-03 02:06:24 +04:00
sched.rs std::rt: Schedule more scheduler callbacks to avoid dropping messages 2013-08-04 21:56:48 -07:00
select.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
sleeper_list.rs Change concurrency primitives to standard naming conventions 2013-07-27 22:06:29 -07:00
stack.rs implement pointer arithmetic with GEP 2013-07-30 02:50:31 -04:00
task.rs Updated std::Option, std::Either and std::Result 2013-08-05 22:42:21 +02:00
test.rs Updated std::Option, std::Either and std::Result 2013-08-05 22:42:21 +02:00
thread_local_storage.rs Deny common lints by default for lib{std,extra} 2013-06-25 17:39:43 -07:00
thread.rs librustc: Disallow "unsafe" for external functions 2013-08-02 21:57:59 -07:00
tube.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
util.rs Updated std::Option, std::Either and std::Result 2013-08-05 22:42:21 +02:00
work_queue.rs Change concurrency primitives to standard naming conventions 2013-07-27 22:06:29 -07:00