Skip to content

Instantly share code, notes, and snippets.

These benchmarks are a bit noisy and imperfect. We focus on the big changes.
extend-after-1.log is taking advantage of TrustedLen in Vec::extend.
name extend-before-1.log ns/iter extend-after-1.log ns/iter diff ns/iter diff %
bench_chain_all 17,866 17,917 51 0.29%
bench_chain_chain_collect 62,249 32,370 -29,879 -48.00%
bench_chain_collect 26,828 25,386 -1,442 -5.37%
bench_chain_extend_ref 18,070 18,606 536 2.97%
@bluss
bluss / -
Created November 10, 2016 00:24
Cargo.toml | 2 +-
src/eigenvalues/general.rs | 10 +++++-----
src/eigenvalues/symmetric.rs | 8 ++++----
src/eigenvalues/types.rs | 7 ++++---
src/impl_prelude.rs | 2 +-
src/least_squares.rs | 22 +++++++++++-----------
src/solve_linear/general.rs | 16 ++++++++--------
src/solve_linear/symmetric.rs | 16 ++++++++--------
src/svd/general.rs | 4 ++--
src/svd/types.rs | 7 ++++---
; 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>" }
#![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
@bluss
bluss / result
Created November 20, 2016 19:17
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%
#![feature(test)]
extern crate test;
use std::mem::size_of_val;
use test::Bencher;
#[bench]
//! ```cargo
//! [dependencies]
//! ignore = "*"
//! log = "*"
//! ```
#[macro_use]
extern crate log;
extern crate ignore;
use ignore::WalkBuilder;
//! ```cargo
//! [dependencies]
//! ignore = "*"
//! log = "*"
//! ```
#[macro_use]
extern crate log;
extern crate ignore;
use ignore::WalkBuilder;
#![feature(test)]
extern crate test;
use test::Bencher;
use std::ptr;
trait VecExt<T> {
fn x_extend_from_slice(&mut self, other: &[T]);
#![feature(test)]
extern crate test;
use test::Bencher;
use std::ptr;
trait VecExt<T> {
fn x_extend_from_slice(&mut self, other: &[T]);