rust/src/libstd
bors d53159a643 auto merge of #10070 : alexcrichton/rust/fewer-missiles, r=brson
This optimizes the `home_for_io` code path by requiring fewer scheduler
operations in some situtations.

When moving to your home scheduler, this no longer forces a context switch if
you're already on the home scheduler. Instead, the homing code now simply pins
you to your current scheduler (making it so you can't be stolen away). If you're
not on your home scheduler, then we context switch away, sending you to your
home scheduler.

When the I/O operation is done, then we also no longer forcibly trigger a
context switch. Instead, the action is cased on whether the task is homed or
not. If a task does not have a home, then the task is re-flagged as not having a
home and no context switch is performed. If a task is homed to the current
scheduler, then we don't do anything, and if the task is homed to a foreign
scheduler, then it's sent along its merry way.

I verified that there are about a third as many `write` syscalls done in print
operations now. Libuv uses write to implement async handles, and the homing
before and after each I/O operation was triggering a write on these async
handles. Additionally, using the terrible benchmark of printing 10k times in a
loop, this drives the runtime from 0.6s down to 0.3s (yay!).
2013-10-26 00:06:09 -07:00
..
fmt Removed unnecessary comments and white spaces as suggested 2013-10-23 01:10:50 +05:30
num Drop the '2' suffix from logging macros 2013-10-22 08:09:56 -07:00
path Remove thread-blocking call to libc::stat in Path::stat 2013-10-22 18:25:07 -07:00
rand auto merge of #9810 : huonw/rust/rand3, r=alexcrichton 2013-10-23 08:31:21 -07:00
rt auto merge of #10070 : alexcrichton/rust/fewer-missiles, r=brson 2013-10-26 00:06:09 -07:00
str Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
task Implement a basic event loop built on LittleLock 2013-10-24 23:49:11 -07:00
unstable Implement a basic event loop built on LittleLock 2013-10-24 23:49:11 -07:00
at_vec.rs Drop the '2' suffix from logging macros 2013-10-22 08:09:56 -07:00
bool.rs Cleaned, documented, wrote tests for up std::bool 2013-10-24 17:21:39 +02:00
borrow.rs std::borrow: Use raw pointer comparison for ref_eq 2013-09-18 06:05:06 +02:00
c_str.rs Remove IoFactoryObject for ~IoFactory 2013-10-24 14:21:57 -07:00
cast.rs std: Move size/align functions to std::mem. #2240 2013-10-17 17:31:35 -07:00
cell.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
char.rs Drop the '2' suffix from logging macros 2013-10-22 08:09:56 -07:00
cleanup.rs Drop the '2' suffix from logging macros 2013-10-22 08:09:56 -07:00
clone.rs remove the float type 2013-10-01 14:54:10 -04:00
cmp.rs Now inline default 'ne' methods 2013-08-30 22:02:24 -04:00
comm.rs Make fields in std::comm private 2013-10-19 00:18:17 +05:30
condition.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
container.rs container: inline contains_key default method 2013-08-20 22:05:03 -04:00
default.rs std: Add a bunch of Default impls 2013-09-12 18:54:13 -07:00
either.rs Drop the '2' suffix from logging macros 2013-10-22 08:09:56 -07:00
from_str.rs Add from_str docs 2013-09-05 00:58:12 -04:00
hash.rs Drop the '2' suffix from logging macros 2013-10-22 08:09:56 -07:00
hashmap.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
iter.rs Removed unnecessary comments and white spaces as suggested 2013-10-23 01:10:50 +05:30
kinds.rs kinds: update documentation 2013-08-15 21:12:34 -04:00
libc.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
local_data.rs Drop the '2' suffix from logging macros 2013-10-22 08:09:56 -07:00
logging.rs Move as much I/O as possible off of native::io 2013-10-24 14:21:57 -07:00
managed.rs Fix an off-by-one in managed::refcount 2013-10-18 09:33:18 -07:00
mem.rs Cleaned, documented, wrote tests for up std::bool 2013-10-24 17:21:39 +02:00
ops.rs Fix a typo in std::ops documentation 2013-10-06 18:51:58 +11:00
option.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
os.rs Test fixes and merge conflicts 2013-10-24 14:21:58 -07:00
owned.rs std: implement Total{Ord,Eq} for pointers. 2013-08-04 19:46:52 +10:00
prelude.rs Remove std::io once and for all! 2013-10-24 14:22:34 -07:00
ptr.rs Implement Clone trait for mutable unsafe pointers 2013-10-25 18:43:55 +09:00
rc.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
reflect.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
repr.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
result.rs Drop the '2' suffix from logging macros 2013-10-22 08:09:56 -07:00
routine.rs libsyntax: Introduce routines and remove all @fns from libsyntax save the old visitor 2013-09-23 18:23:21 -07:00
run.rs Another round of test fixes and merge conflicts 2013-10-24 14:22:35 -07:00
select.rs Implement a basic event loop built on LittleLock 2013-10-24 23:49:11 -07:00
send_str.rs Implemented IntoSendStr on SendStr to allow naming a 2013-10-05 21:28:04 +02:00
std.rs Remove std::io once and for all! 2013-10-24 14:22:34 -07:00
str.rs Remove IoFactoryObject for ~IoFactory 2013-10-24 14:21:57 -07:00
sys.rs std: Move sys::log_str to repr::repr_to_str. Further work on #2240. 2013-10-21 11:59:23 -07:00
to_bytes.rs Remove std::io once and for all! 2013-10-24 14:22:34 -07:00
to_str.rs std: Remove usage of fmt! 2013-09-30 23:21:18 -07:00
trie.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30
tuple.rs std: Replace CloneableTuple with Tuple, which takes self by-val. 2013-09-25 19:00:08 +10:00
unicode.rs rename std::iterator to std::iter 2013-09-09 03:21:46 -04:00
unit.rs std: Add a bunch of Default impls 2013-09-12 18:54:13 -07:00
util.rs std: Move size/align functions to std::mem. #2240 2013-10-17 17:31:35 -07:00
vec.rs Removed Unnecessary comments and white spaces #4386 2013-10-23 01:10:50 +05:30