This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Length Normal arrays TypedArrays (before) TypedArrays (after) | |
Small (4) 340 ms 2400 ms 96 ms | |
Large (16) 510 ms 7900 ms 280 ms | |
Dynamic 5500 ms 12300 ms 1900 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::run::{Process, ProcessOptions}; | |
struct Gdb { | |
process: Process, | |
} | |
trait Debugger { | |
fn new(debuggee: ~str) -> Gdb; | |
fn send(&self, cmd: &str) -> int; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"assert", | |
"buffer_ieee754", | |
"buffer", | |
"child_process", | |
"cluster", | |
"console", | |
"constants", | |
"crypto", | |
"_debugger", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = require('./core.json').reduce(function (acc, x) { | |
acc[x] = true; | |
return acc; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn spawn(&self, request: mongrel2::Request) { | |
let (_, callback) = self.routes[0]; // TODO: url routing | |
let (port, chan) : (Port<~str>, Chan<~str>) = stream(); | |
let env_request = request.clone(); | |
do spawn { | |
callback(~Env { | |
out_ch: &chan, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=== fields: === | |
&[{ | |
ident: { | |
name: 68, | |
ctxt: 0 | |
}, | |
expr: @{ | |
id: 35, | |
node: expr_call(@{ | |
id: 33, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'minimal.rc' | |
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%tydesc = type { i64, i64, void ({}*, i8*)*, void ({}*, i8*)*, void ({}*, i8*)*, void ({}*, i8*)* } | |
%"enum.TreeItem<int>" = type { i64 } | |
@_rust_crate_map_toplevel = global { i32, i8*, i64, [2 x i64] } { i32 1, i8* bitcast (void ({ i64, %tydesc*, i8*, i8*, i8 }*)* @"_ZN8unstable4lang10annihilate16_82984335c95fdd514_0$x2e8$x2dpreE" to i8*), i64 ptrtoint ([1 x { i64, i64 }]* @_rust_mod_map to i64), [2 x i64] [i64 ptrtoint (i64* @_rust_crate_map_std_0.8-pre_6c65cf4b443341b1 to i64), i64 0] } | |
@"_ZN8TreeItem8TreeLeaf7descrim17_86f9b6e6f0d35a7e7_0$x2e0E" = constant i64 0 | |
@_rust_crate_map_std_0.8-pre_6c65cf4b443341b1 = external global i64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct BTree<V> { | |
node: TreeItem<V>, | |
} | |
pub enum TreeItem<V> { | |
TreeLeaf { value: V }, | |
} | |
pub fn leaf<V>(value: V) -> TreeItem<V> { | |
TreeLeaf { value: value } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub static BTREE_MIN_DEGREE : uint = 20; | |
//pub static BTREE_MIN_DEGREE : uint = 2; | |
pub static BTREE_KEYS_LBOUND : uint = BTREE_MIN_DEGREE - 1; | |
pub static BTREE_KEYS_UBOUND : uint = 2 * BTREE_MIN_DEGREE - 1; | |
pub struct BTree<K, V> { | |
priv used: uint, | |
priv keys: [Option<K>, ..BTREE_KEYS_UBOUND], | |
priv nodes: [Option<TreeItem<K, V>>, ..BTREE_KEYS_UBOUND + 1], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Fix: add `#[deriving(Clone]' to the enum. | |
zmq.rc:200:8: 215:9 error: failed to find an implementation of trait std::clone::Clone for Error | |
zmq.rc:200 do getsockopt_int(self.sock, constants::ZMQ_TYPE).map |ty| { | |
zmq.rc:201 match *ty { | |
zmq.rc:202 0 => PAIR, | |
zmq.rc:203 1 => PUB, | |
zmq.rc:204 2 => SUB, | |
zmq.rc:205 3 => REQ, | |
*/ |
NewerOlder