This file contains 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
#![crate_type="lib"] | |
#[no_mangle] | |
pub fn id_option(a: Option<u32>) -> Option<u32> { | |
match a { | |
Some(x) => Some(x), | |
None => None, | |
} | |
} |
This file contains 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 = 'extend_from_slice.cgu-0.rs' | |
source_filename = "extend_from_slice.cgu-0.rs" | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%str_slice = type { i8*, i64 } | |
%"test::Bencher" = type { i64, %"std::time::duration::Duration", i64 } | |
%"std::time::duration::Duration" = type { i64, i32 } | |
%"std::time::Instant" = type { %"std::sys::imp::time::inner::Instant" } | |
%"std::sys::imp::time::inner::Instant" = type { %"std::sys::imp::time::Timespec" } |
This file contains 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
#![feature(test)] | |
extern crate test; | |
use test::Bencher; | |
use std::ptr; | |
trait VecExt<T> { | |
fn x_extend_from_slice(&mut self, other: &[T]); |
This file contains 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
#![feature(test)] | |
extern crate test; | |
use test::Bencher; | |
use std::ptr; | |
trait VecExt<T> { | |
fn x_extend_from_slice(&mut self, other: &[T]); |
This file contains 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
//! ```cargo | |
//! [dependencies] | |
//! ignore = "*" | |
//! log = "*" | |
//! ``` | |
#[macro_use] | |
extern crate log; | |
extern crate ignore; | |
use ignore::WalkBuilder; |
This file contains 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
//! ```cargo | |
//! [dependencies] | |
//! ignore = "*" | |
//! log = "*" | |
//! ``` | |
#[macro_use] | |
extern crate log; | |
extern crate ignore; | |
use ignore::WalkBuilder; |
This file contains 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
#![feature(test)] | |
extern crate test; | |
use std::mem::size_of_val; | |
use test::Bencher; | |
#[bench] |
This file contains 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
name tests::sort_ ns/iter tests::new_sort_ ns/iter diff ns/iter diff % | |
ascending 58,373 (685 MB/s) 55,175 (724 MB/s) -3,198 -5.48% | |
big_ascending 240,410 (1331 MB/s) 108,604 (2946 MB/s) -131,806 -54.83% | |
big_descending 241,974 (1322 MB/s) 112,114 (2854 MB/s) -129,860 -53.67% | |
big_random_large 2,042,345 (156 MB/s) 1,964,713 (162 MB/s) -77,632 -3.80% | |
big_random_medium 16,891 (189 MB/s) 15,804 (202 MB/s) -1,087 -6.44% | |
big_random_small 800 (200 MB/s) 803 (199 MB/s) 3 0.38% | |
descending 58,727 (681 MB/s) 55,781 (717 MB/s) -2,946 -5.02% | |
random_large 769,153 (104 MB/s) 738,682 (108 MB/s) -30,471 -3.96% | |
random_medium 5,812 (137 MB/s) 5,735 (139 MB/s) -77 -1.32% |
This file contains 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
#![feature(test)] | |
extern crate test; | |
use test::{Bencher}; | |
/// Mask of the value bits of a continuation byte | |
const CONT_MASK: u8 = 0b0011_1111; | |
/// Value of the tag bits (tag mask is !CONT_MASK) of a continuation byte |
This file contains 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 = 'countbytes.cgu-0.rs' | |
source_filename = "countbytes.cgu-0.rs" | |
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%str_slice = type { i8*, i64 } | |
%"3.std::string::String" = type { %"3.std::vec::Vec<u8>" } | |
%"3.std::vec::Vec<u8>" = type { %"5.alloc::raw_vec::RawVec<u8>", i64 } | |
%"5.alloc::raw_vec::RawVec<u8>" = type { %"2.std::ptr::Unique<u8>", i64 } | |
%"2.std::ptr::Unique<u8>" = type { %"2.core::nonzero::NonZero<*const u8>", %"2.std::marker::PhantomData<u8>" } |