Skip to content

Instantly share code, notes, and snippets.

fn test_buf_len() {
let s0 = "hello";
let s1 = "there";
let s2 = "thing";
do str::as_c_str(s0) {|p0|
do str::as_c_str(s1) {|p1|
do str::as_c_str(s2) {|p2|
}
#[test]
+ #[ignore(reason = "valgrind says it's leaky")]
fn test_ip_get_addr_bad_input() {
let localhost_name = "sjkl234m,./sdf";
let iotask = uv::global_loop::get();
diff --git a/src/libstd/uv_ll.rs b/src/libstd/uv_ll.rs
index 4c0f383..1e4fe0f 100644
--- a/src/libstd/uv_ll.rs
+++ b/src/libstd/uv_ll.rs
rust: ~"(building reduced graph for external crate) building value JSVAL_TRUE"
rust: ~"(each_path) yielding implicit item: JS_ARGV"
rust: ~"(building reduced graph for external crate) found path entry: JS_ARGV (dl_def(def_fn((6, 233), 1)))"
rust: ~"(building reduced graph for external crate) building value JS_ARGV"
rust: ~"(each_path) yielding implicit item: JS_SET_RVAL"
rust: ~"(building reduced graph for external crate) found path entry: JS_SET_RVAL (dl_def(def_fn((6, 265), 1)))"
rust: ~"(building reduced graph for external crate) building value JS_SET_RVAL"
rust: ~"(each_path) yielding implicit item: JS_NewRuntime"
rust: ~"(building reduced graph for external crate) found path entry: JS_NewRuntime (dl_def(def_fn((6, 1905), 2)))"
rust: ~"(building reduced graph for external crate) building value JS_NewRuntime"
@brson
brson / gist:3102927
Created July 13, 2012 05:30
rust v erlang pipes
5> client:runTest2(3000000).
Count is 300000000
Test took 3.046361 seconds
Throughput=984781.5147318391 per sec
ok
brian@axis:~/dev/rust/build$ x86_64-unknown-linux-gnu/test/bench/msgsend-pipes.stage1-x86_64-unknown-linux-gnu 3000000 16
Count is 300000000
Test took 3.68673 seconds
Throughput=813730.208909 per sec
/home/banderson/Dev/rust3/src/libstd/net_url.rs:79:8: 79:13 error: mismatched types:
expected `send_map::linear::linear_map/&<~str,~str>` but found
`send_map::linear::linear_map/&<block at /home/banderson/Dev/rust3/src/libstd
/net_url.rs:71:48: 80:1><~str,~str>` (references with lifetime &<block at
/home/banderson/Dev/rust3/src/libstd/net_url.rs:71:48: 80:1> do not necessarily
outlive references with lifetime &)
/home/banderson/Dev/rust3/src/libstd/net_url.rs:79 ret query;
^~~~~
alt 0 {
00 => {
}
01 => if true {
} else {
}
03 => alt 0 {
_ => ()
}
04 => do fun {
@brson
brson / gist:3711448
Created September 13, 2012 02:22
Rust keywords to macros
fn main() {
macro_rules! log_(
($lvl:expr, $msg:expr) => (
log($lvl, $msg)
);
);
macro_rules! assert_(
($pred:expr) => (
assert $pred
# adc1427282b4da8f963550e87cdbe512157958b4
## RUST_BENCH=1 perf record x86_64-unknown-linux-gnu/test/bench/msgsend-pipes.stage2-x86_64-unknown-linux-gnu
Count is 100000000
Test took 1.3927 seconds
Throughput=718029.353679 per sec
[ perf record: Woken up 8 times to write data ]
[ perf record: Captured and wrote 2.342 MB perf.data (~102334 samples) ]
# before
inux-gnu
Count is 100000000
Test took 1.71655 seconds
Throughput=582565.195637 per sec
[ perf record: Woken up 7 times to write data ]
[ perf record: Captured and wrote 2.072 MB perf.data (~90531 samples) ]
banderson@banderson-ThinkPad-W520:~/Dev/rust2/build$ ^C
banderson@banderson-ThinkPad-W520:~/Dev/rust2/build$ RUST_MIN_STACK=1000000 RUST_BENCH=1 perf record x86_64-unknown-linux-gnu/test/bench/msgsend-pipes.stage2-x86_64-unknown-linux-gnu
@brson
brson / gist:3724800
Created September 14, 2012 21:02
More Rust trans refactor regression numbers
# adc1427282b4da8f963550e87cdbe512157958b4
banderson@banderson-ThinkPad-W520:~/Dev/rust2/build$ RUST_BENCH=1 perf record x86_64-unknown-linux-gnu/test/bench/msgsend-pipes.stage1-x86_64-unknown-linux-gnu
Count is 100000000
Test took 1.50227 seconds
Throughput=665658.192290 per sec
[ perf record: Woken up 5 times to write data ]
[ perf record: Captured and wrote 2.041 MB perf.data (~89181 samples) ]
banderson@banderson-ThinkPad-W520:~/Dev/rust2/build$ RUST_BENCH=1 perf record x86_64-unknown-linux-gnu/test/bench/msgsend-pipes.stage1-x86_64-unknown-linux-gnu
Count is 100000000