Skip to content

Instantly share code, notes, and snippets.

@japaric
Created November 24, 2014 14:01
Show Gist options
  • Save japaric/7fe70658d75a51930f1d to your computer and use it in GitHub Desktop.
Save japaric/7fe70658d75a51930f1d to your computer and use it in GitHub Desktop.
Benchmarking lots of BufWriters
[package]
name = "serial"
version = "0.0.1"
authors = ["Jorge Aparicio <[email protected]>"]
[dependencies.criterion]
git = "https://github.com/japaric/criterion.rs"
[profile.test]
opt-level = 3
#![feature(phase, slicing_syntax)]
extern crate criterion;
#[phase(plugin)]
extern crate criterion_macros;
use criterion::{Bencher, Criterion};
use std::cmp::min;
use std::io::{IoError, IoResult};
use std::raw::Repr;
use std::{io, mem, ptr, raw, slice};
const SRC_LEN: uint = 4;
const BATCHES: uint = 128;
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#[inline]
fn do_std_writes<W: Writer>(dst: &mut W, src: &[u8], batches: uint) {
for _ in range(0, batches) {
dst.write(src).unwrap();
}
}
#[inline(always)]
fn do_std_writes_inline_always<W: Writer>(dst: &mut W, src: &[u8], batches: uint) {
for _ in range(0, batches) {
dst.write(src).unwrap();
}
}
#[inline(never)]
fn do_std_writes_inline_never<W: Writer>(dst: &mut W, src: &[u8], batches: uint) {
for _ in range(0, batches) {
dst.write(src).unwrap();
}
}
//////////////////////////////////////////////////////////////////////////////
#[test]
fn test_std_vec_writer() {
let mut dst = Vec::with_capacity(BATCHES * SRC_LEN);
let src = &[1, .. SRC_LEN];
do_std_writes(&mut dst, src, BATCHES);
assert_eq!(dst.len(), BATCHES * SRC_LEN);
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_std_vec_writer(b: &mut Bencher) {
let mut dst = Vec::with_capacity(BATCHES * SRC_LEN);
let src = &[1, .. SRC_LEN];
b.iter(|| {
dst.clear();
do_std_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_std_vec_writer_inline_always(b: &mut Bencher) {
let mut dst = Vec::with_capacity(BATCHES * SRC_LEN);
let src = &[1, .. SRC_LEN];
b.iter(|| {
dst.clear();
do_std_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_std_vec_writer_inline_never(b: &mut Bencher) {
let mut dst = Vec::with_capacity(BATCHES * SRC_LEN);
let src = &[1, .. SRC_LEN];
b.iter(|| {
dst.clear();
do_std_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
#[test]
fn test_std_buf_writer() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = io::BufWriter::new(dst);
do_std_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_std_buf_writer(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = io::BufWriter::new(dst);
do_std_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_std_buf_writer_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = io::BufWriter::new(dst);
do_std_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_std_buf_writer_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = io::BufWriter::new(dst);
do_std_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
#[inline]
unsafe fn do_copy_nonoverlapping_memory(mut dst: *mut u8, src: *const u8, len: uint, batches: uint) {
for _ in range(0, batches) {
ptr::copy_nonoverlapping_memory(dst, src, len);
dst = dst.offset(len as int);
}
}
#[inline(never)]
unsafe fn do_copy_nonoverlapping_memory_inline_never(mut dst: *mut u8, src: *const u8, len: uint, batches: uint) {
for _ in range(0, batches) {
ptr::copy_nonoverlapping_memory(dst, src, len);
dst = dst.offset(len as int);
}
}
#[inline(always)]
unsafe fn do_copy_nonoverlapping_memory_inline_always(mut dst: *mut u8, src: *const u8, len: uint, batches: uint) {
for _ in range(0, batches) {
ptr::copy_nonoverlapping_memory(dst, src, len);
dst = dst.offset(len as int);
}
}
#[test]
fn test_copy_nonoverlapping_memory() {
let dst = &mut [0_u8, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
unsafe {
do_copy_nonoverlapping_memory(dst.as_mut_ptr(), src.as_ptr(), src.len(), BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_copy_nonoverlapping_memory(b: &mut Bencher) {
let dst = &mut [0_u8, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
unsafe {
do_copy_nonoverlapping_memory(dst.as_mut_ptr(), src.as_ptr(), src.len(), BATCHES);
}
})
}
#[criterion]
fn bench_copy_nonoverlapping_memory_inline_always(b: &mut Bencher) {
let dst = &mut [0_u8, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
unsafe {
do_copy_nonoverlapping_memory_inline_always(dst.as_mut_ptr(), src.as_ptr(), src.len(), BATCHES);
}
})
}
#[criterion]
fn bench_copy_nonoverlapping_memory_inline_never(b: &mut Bencher) {
let dst = &mut [0_u8, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
unsafe {
do_copy_nonoverlapping_memory_inline_never(dst.as_mut_ptr(), src.as_ptr(), src.len(), BATCHES);
}
})
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
trait MyWriter {
fn my_write(&mut self, src: &[u8]) -> IoResult<()>;
}
#[inline]
fn do_my_writes<W>(dst: &mut W, src: &[u8], batches: uint) where W: MyWriter {
for _ in range(0, batches) {
dst.my_write(src).unwrap();
}
}
#[inline(never)]
fn do_my_writes_inline_never<W>(dst: &mut W, src: &[u8], batches: uint) where W: MyWriter {
for _ in range(0, batches) {
dst.my_write(src).unwrap();
}
}
#[inline(always)]
fn do_my_writes_inline_always<W>(dst: &mut W, src: &[u8], batches: uint) where W: MyWriter {
for _ in range(0, batches) {
dst.my_write(src).unwrap();
}
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, as `&mut [u8]`.
impl<'a> MyWriter for &'a mut [u8] {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
if self.is_empty() { return Err(io::standard_error(io::EndOfFile)); }
let dst_len = self.len();
let src_len = src.len();
let write_len = min(dst_len, src_len);
slice::bytes::copy_memory(*self, src.slice_to(write_len));
unsafe {
*self = mem::transmute(raw::Slice {
data: self.as_ptr().offset(write_len as int),
len: dst_len - write_len,
});
}
if src_len > dst_len {
Err(io::standard_error(io::ShortWrite(write_len)))
} else {
Ok(())
}
}
}
#[test]
fn test_slice_writer() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = dst.as_mut_slice();
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_slice_writer(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = dst.as_mut_slice();
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_slice_writer_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = dst.as_mut_slice();
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_slice_writer_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = dst.as_mut_slice();
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// No bound checks
struct UnsafeWriter<'a> {
dst: *mut u8,
}
impl<'a> UnsafeWriter<'a> {
#[inline]
fn new(dst: &'a mut [u8]) -> UnsafeWriter<'a> {
UnsafeWriter {
dst: dst.as_mut_ptr(),
}
}
}
impl<'a> MyWriter for UnsafeWriter<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let len = src.len();
unsafe {
ptr::copy_nonoverlapping_memory(self.dst, src.as_ptr(), len);
self.dst = self.dst.offset(len as int);
}
Ok(())
}
}
#[test]
fn test_unsafe_writer() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = UnsafeWriter::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_unsafe_writer(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = UnsafeWriter::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_unsafe_writer_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = UnsafeWriter::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_unsafe_writer_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = UnsafeWriter::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, as `&mut [u8]`.
struct BufWriter0<'a> {
dst: &'a mut [u8],
}
impl<'a> BufWriter0<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter0<'a> {
BufWriter0 {
dst: dst
}
}
}
impl<'a> MyWriter for BufWriter0<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
if self.dst.is_empty() { return Err(io::standard_error(io::EndOfFile)); }
let dst_len = self.dst.len();
let src_len = src.len();
let write_len = min(dst_len, src_len);
slice::bytes::copy_memory(self.dst, src.slice_to(write_len));
unsafe {
self.dst = mem::transmute(raw::Slice {
data: self.dst.as_ptr().offset(write_len as int),
len: dst_len - write_len,
});
}
if src_len > dst_len {
Err(io::standard_error(io::ShortWrite(write_len)))
} else {
Ok(())
}
}
}
#[test]
fn test_buf_writer_0() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter0::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_0(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter0::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_0_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter0::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_0_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter0::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound checked, but no error messages.
struct BufWriter1<'a> {
dst: &'a mut [u8],
}
impl<'a> BufWriter1<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter1<'a> {
BufWriter1 {
dst: dst,
}
}
}
impl<'a> MyWriter for BufWriter1<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let dst_len = self.dst.len();
let src_len = src.len();
let write_len = min(dst_len, src_len);
slice::bytes::copy_memory(self.dst, src[..write_len]);
unsafe {
let self_: &mut raw::Slice<u8> = mem::transmute(self);
self_.data = self_.data.offset(write_len as int);
self_.len = dst_len - write_len;
}
Ok(())
}
}
#[test]
fn test_buf_writer_1() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter1::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_1(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter1::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_1_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter1::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_1_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter1::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, fixed length.
struct BufWriter2<'a> {
dst: &'a mut [u8],
}
impl<'a> BufWriter2<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter2<'a> {
BufWriter2 {
dst: dst,
}
}
}
impl<'a> MyWriter for BufWriter2<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let dst_len = self.dst.len();
let write_len = src.len();
slice::bytes::copy_memory(self.dst, src[..write_len]);
unsafe {
let self_: &mut raw::Slice<u8> = mem::transmute(self);
self_.data = self_.data.offset(write_len as int);
self_.len = dst_len - write_len;
}
Ok(())
}
}
#[test]
fn test_buf_writer_2() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter2::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_2(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter2::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_2_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter2::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_2_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter2::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, same as std::BufWriter.
struct BufWriter3<'a> {
dst: &'a mut [u8],
pos: uint,
}
impl<'a> BufWriter3<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter3<'a> {
BufWriter3 {
dst: dst,
pos: 0,
}
}
}
impl<'a> MyWriter for BufWriter3<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
// return an error if the entire write does not fit in the buffer
let cap = if self.pos >= self.dst.len() { 0 } else { self.dst.len() - self.pos };
if src.len() > cap {
return Err(IoError {
kind: io::OtherIoError,
desc: "Trying to write past end of buffer",
detail: None
})
}
slice::bytes::copy_memory(self.dst[mut self.pos..], src);
self.pos += src.len();
Ok(())
}
}
#[test]
fn test_buf_writer_3() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter3::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_3(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter3::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_3_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter3::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_3_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter3::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, pointers for beginning and end.
struct BufWriter4<'a> {
dst: *mut u8,
end: *mut u8,
}
impl<'a> BufWriter4<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter4<'a> {
let dst_ptr = dst.as_mut_ptr();
unsafe {
BufWriter4 {
dst: dst_ptr,
end: dst_ptr.offset(dst.len() as int),
}
}
}
#[inline]
fn capacity(&self) -> uint {
self.end as uint - self.dst as uint
}
}
impl<'a> MyWriter for BufWriter4<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let src_len = src.len();
if src_len > self.capacity() {
return Err(IoError {
kind: io::OtherIoError,
desc: "Trying to write past end of buffer",
detail: None
})
}
unsafe {
ptr::copy_nonoverlapping_memory(self.dst, src.as_ptr(), src_len);
self.dst = self.dst.offset(src_len as int);
}
Ok(())
}
}
#[test]
fn test_buf_writer_4() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter4::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_4(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter4::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_4_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter4::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_4_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter4::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Like BufWriter1, but with no `min`.
struct BufWriter5<'a> {
dst: &'a mut [u8],
}
impl<'a> BufWriter5<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter5<'a> {
BufWriter5 {
dst: dst,
}
}
}
impl<'a> MyWriter for BufWriter5<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let dst_len = self.dst.len();
let src_len = src.len();
let x = (dst_len < src_len) as uint;
let write_len = dst_len * x + src_len * (1 - x);
slice::bytes::copy_memory(self.dst, src[..write_len]);
unsafe {
let self_: &mut raw::Slice<u8> = mem::transmute(self);
self_.data = self_.data.offset(write_len as int);
self_.len = dst_len - write_len;
}
Ok(())
}
}
#[test]
fn test_buf_writer_5() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter5::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_5(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter5::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_5_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter5::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_5_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter5::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound checked with unsafe code, but no error messages.
struct BufWriter6<'a> {
dst: &'a mut [u8],
}
impl<'a> BufWriter6<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter6<'a> {
BufWriter6 {
dst: dst,
}
}
}
impl<'a> MyWriter for BufWriter6<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let dst_len = self.dst.len();
let src_len = src.len();
let write_len = min(dst_len, src_len);
unsafe {
ptr::copy_nonoverlapping_memory(
self.dst.as_mut_ptr(),
src.as_ptr(),
write_len);
let self_: &mut raw::Slice<u8> = mem::transmute(self);
self_.data = self_.data.offset(write_len as int);
self_.len = dst_len - write_len;
}
Ok(())
}
}
#[test]
fn test_buf_writer_6() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter6::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_6(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter6::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_6_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter6::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_6_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter6::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// As BufWriter3, but with unsafe code.
struct BufWriter7<'a> {
dst: &'a mut [u8],
pos: uint,
}
impl<'a> BufWriter7<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter7<'a> {
BufWriter7 {
dst: dst,
pos: 0,
}
}
}
impl<'a> MyWriter for BufWriter7<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
// return an error if the entire write does not fit in the buffer
let dst_len = self.dst.len();
let src_len = src.len();
let cap = if self.pos >= dst_len { 0 } else { dst_len - self.pos };
if src_len > cap {
return Err(IoError {
kind: io::OtherIoError,
desc: "Trying to write past end of buffer",
detail: None
})
}
unsafe {
ptr::copy_nonoverlapping_memory(
self.dst.as_mut_ptr().offset(self.pos as int),
src.as_ptr(),
src_len);
}
self.pos += src_len;
Ok(())
}
}
#[test]
fn test_buf_writer_7() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter7::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_7(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter7::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_7_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter7::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_7_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter7::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, as BufWriter4, pointers for beginning and end, inline capacity
struct BufWriter8<'a> {
dst: *mut u8,
end: *mut u8,
}
impl<'a> BufWriter8<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter8<'a> {
let dst_ptr = dst.as_mut_ptr();
unsafe {
BufWriter8 {
dst: dst_ptr,
end: dst_ptr.offset(dst.len() as int),
}
}
}
}
impl<'a> MyWriter for BufWriter8<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let src_len = src.len();
let cap = self.end as uint - self.dst as uint;
if src_len > cap {
return Err(IoError {
kind: io::OtherIoError,
desc: "Trying to write past end of buffer",
detail: None
})
}
unsafe {
ptr::copy_nonoverlapping_memory(self.dst, src.as_ptr(), src_len);
self.dst = self.dst.offset(src_len as int);
}
Ok(())
}
}
#[test]
fn test_buf_writer_8() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter8::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_8(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter8::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_8_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter8::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_8_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter8::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, as BufWriter4, pointers for beginning and end, inline capacity
struct BufWriter9<'a> {
dst: *mut u8,
end: *mut u8,
}
impl<'a> BufWriter9<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter9<'a> {
let dst_ptr = dst.as_mut_ptr();
unsafe {
BufWriter9 {
dst: dst_ptr,
end: dst_ptr.offset(dst.len() as int),
}
}
}
}
impl<'a> MyWriter for BufWriter9<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
unsafe {
let raw::Slice { data: src_ptr, len: src_len } = src.repr();
let cap = self.end as uint - self.dst as uint;
if src_len > cap {
return Err(IoError {
kind: io::OtherIoError,
desc: "Trying to write past end of buffer",
detail: None
})
}
ptr::copy_nonoverlapping_memory(self.dst, src_ptr, src_len);
self.dst = self.dst.offset(src_len as int);
}
Ok(())
}
}
#[test]
fn test_buf_writer_9() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter9::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_9(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter9::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_9_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter9::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_9_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter9::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, same as std::BufWriter.
struct BufWriter10<'a> {
dst: &'a mut [u8],
pos: uint,
}
impl<'a> BufWriter10<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter10<'a> {
BufWriter10 {
dst: dst,
pos: 0,
}
}
}
impl<'a> MyWriter for BufWriter10<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let dst_len = self.dst.len();
let src_len = src.len();
if self.pos == dst_len { return Err(io::standard_error(io::EndOfFile)); }
let cap = dst_len - self.pos;
let write_len = min(cap, src_len);
slice::bytes::copy_memory(self.dst[mut self.pos..], src[..write_len]);
if src_len > dst_len {
return Err(io::standard_error(io::ShortWrite(write_len)));
}
self.pos += write_len;
Ok(())
}
}
#[test]
fn test_buf_writer_10() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter10::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_10(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter10::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_10_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter10::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_10_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter10::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, same as std::BufWriter.
struct BufWriter11<'a> {
dst: &'a mut [u8],
pos: uint,
}
impl<'a> BufWriter11<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter11<'a> {
BufWriter11 {
dst: dst,
pos: 0,
}
}
}
impl<'a> MyWriter for BufWriter11<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let dst = self.dst[mut self.pos..];
let dst_len = dst.len();
if dst_len == 0 {
return Err(io::standard_error(io::EndOfFile));
}
let src_len = src.len();
if dst_len >= src_len {
unsafe {
ptr::copy_nonoverlapping_memory(
dst.as_mut_ptr(),
src.as_ptr(),
src_len);
}
self.pos += src_len;
Ok(())
} else {
unsafe {
ptr::copy_nonoverlapping_memory(
dst.as_mut_ptr(),
src.as_ptr(),
dst_len);
}
self.pos += dst_len;
Err(io::standard_error(io::ShortWrite(dst_len)))
}
}
}
#[test]
fn test_buf_writer_11() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter11::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_11(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter11::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_11_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter11::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_11_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter11::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, same as std::BufWriter.
struct BufWriter12<'a> {
dst: &'a mut [u8],
}
impl<'a> BufWriter12<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter12<'a> {
BufWriter12 {
dst: dst,
}
}
}
impl<'a> MyWriter for BufWriter12<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let dst_len = self.dst.len();
if dst_len == 0 {
return Err(io::standard_error(io::EndOfFile));
}
let src_len = src.len();
if dst_len >= src_len {
unsafe {
ptr::copy_nonoverlapping_memory(
self.dst.as_mut_ptr(),
src.as_ptr(),
src_len);
self.dst = mem::transmute(raw::Slice {
data: self.dst.as_ptr().offset(src_len as int),
len: dst_len - src_len,
});
}
Ok(())
} else {
unsafe {
ptr::copy_nonoverlapping_memory(
self.dst.as_mut_ptr(),
src.as_ptr(),
dst_len);
self.dst = mem::transmute(raw::Slice {
data: self.dst.as_ptr().offset(dst_len as int),
len: 0,
});
}
Err(io::standard_error(io::ShortWrite(dst_len)))
}
}
}
#[test]
fn test_buf_writer_12() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter12::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_12(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter12::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_12_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter12::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_12_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter12::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
// Bound check, same as std::BufWriter.
struct BufWriter13<'a> {
dst: *mut u8,
end: *mut u8,
}
impl<'a> BufWriter13<'a> {
#[inline]
fn new<'a>(dst: &'a mut [u8]) -> BufWriter13<'a> {
let dst_ptr = dst.as_mut_ptr();
unsafe {
BufWriter13 {
dst: dst_ptr,
end: dst_ptr.offset(dst.len() as int),
}
}
}
}
impl<'a> MyWriter for BufWriter13<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let dst_len = self.end as uint - self.dst as uint;
if dst_len == 0 {
return Err(io::standard_error(io::EndOfFile));
}
let src_len = src.len();
if dst_len >= src_len {
unsafe {
ptr::copy_nonoverlapping_memory(
self.dst,
src.as_ptr(),
src_len);
self.dst = self.dst.offset(src_len as int);
}
Ok(())
} else {
unsafe {
ptr::copy_nonoverlapping_memory(
self.dst,
src.as_ptr(),
dst_len);
self.dst = self.dst.offset(dst_len as int);
}
Err(io::standard_error(io::ShortWrite(dst_len)))
}
}
}
#[test]
fn test_buf_writer_13() {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
{
let mut dst = BufWriter13::new(dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_buf_writer_13(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter13::new(dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_13_inline_always(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter13::new(dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_buf_writer_13_inline_never(b: &mut Bencher) {
let dst = &mut [0, .. BATCHES * SRC_LEN];
let src = &[1, .. SRC_LEN];
b.iter(|| {
let mut dst = BufWriter13::new(dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
struct VecWriter1<'a> {
dst: &'a mut Vec<u8>,
}
impl<'a> VecWriter1<'a> {
#[inline]
fn new<'a>(dst: &'a mut Vec<u8>) -> VecWriter1<'a> {
VecWriter1 {
dst: dst,
}
}
}
impl<'a> MyWriter for VecWriter1<'a> {
#[inline]
fn my_write(&mut self, src: &[u8]) -> IoResult<()> {
let src_len = src.len();
self.dst.reserve(src_len);
let dst = self.dst.as_mut_slice();
unsafe {
// we reserved enough room in `dst` to store `src`.
ptr::copy_nonoverlapping_memory(
dst.as_mut_ptr(),
src.as_ptr(),
src_len);
}
Ok(())
}
}
#[test]
fn test_vec_writer_1() {
let mut dst = Vec::with_capacity(BATCHES * SRC_LEN);
let src = &[1, .. SRC_LEN];
{
let mut dst = VecWriter1::new(&mut dst);
do_my_writes(&mut dst, src, BATCHES);
}
assert!(dst.iter().all(|c| *c == 1));
}
#[criterion]
fn bench_vec_writer_1(b: &mut Bencher) {
let mut dst = Vec::with_capacity(BATCHES * SRC_LEN);
let src = &[1, .. SRC_LEN];
b.iter(|| {
dst.clear();
let mut dst = VecWriter1::new(&mut dst);
do_my_writes(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_vec_writer_1_inline_always(b: &mut Bencher) {
let mut dst = Vec::with_capacity(BATCHES * SRC_LEN);
let src = &[1, .. SRC_LEN];
b.iter(|| {
dst.clear();
let mut dst = VecWriter1::new(&mut dst);
do_my_writes_inline_always(&mut dst, src, BATCHES);
})
}
#[criterion]
fn bench_vec_writer_1_inline_never(b: &mut Bencher) {
let mut dst = Vec::with_capacity(BATCHES * SRC_LEN);
let src = &[1, .. SRC_LEN];
b.iter(|| {
dst.clear();
let mut dst = VecWriter1::new(&mut dst);
do_my_writes_inline_never(&mut dst, src, BATCHES);
})
}
$ rustc -v
rustc 0.13.0-dev (22513fed3 2014-11-23 11:51:50 +0000)
$ RUST_THREADS=1 cargo test -- --nocapture
Running target/serial-0112f1f92fb4eef6
running 80 tests
Benchmarking bench_buf_writer_0
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0061 s
> Found 14 outliers among 100 measurements (14.00%)
> 14 (14.00%) high severe
> Performing linear regression
> slope [1.5057 us 1.5118 us]
> R^2 0.9997189 0.9997141
> Estimating the statistics of the sample
> mean [1.5082 us 1.5167 us]
> median [1.5038 us 1.5061 us]
> MAD [3.3965 ns 6.4759 ns]
> SD [14.517 ns 27.462 ns]
test bench_buf_writer_0 ... ok
Benchmarking bench_buf_writer_0_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0042 s
> Found 11 outliers among 100 measurements (11.00%)
> 2 (2.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [1.5003 us 1.5033 us]
> R^2 0.9999409 0.9999392
> Estimating the statistics of the sample
> mean [1.5024 us 1.5095 us]
> median [1.5000 us 1.5015 us]
> MAD [2.7121 ns 5.0377 ns]
> SD [9.5194 ns 26.478 ns]
test bench_buf_writer_0_inline_always ... ok
Benchmarking bench_buf_writer_0_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0046 s
> Found 14 outliers among 100 measurements (14.00%)
> 3 (3.00%) high mild
> 11 (11.00%) high severe
> Performing linear regression
> slope [1.6215 us 1.6239 us]
> R^2 0.9999510 0.9999500
> Estimating the statistics of the sample
> mean [1.6254 us 1.6531 us]
> median [1.6211 us 1.6224 us]
> MAD [2.1490 ns 4.4087 ns]
> SD [14.591 ns 116.08 ns]
test bench_buf_writer_0_inline_never ... ok
Benchmarking bench_buf_writer_1
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0005 s
> Found 11 outliers among 100 measurements (11.00%)
> 3 (3.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [370.88 ns 371.47 ns]
> R^2 0.9999469 0.9999460
> Estimating the statistics of the sample
> mean [371.60 ns 381.22 ns]
> median [370.67 ns 371.41 ns]
> MAD [960.57 ps 1.5960 ns]
> SD [2.8599 ns 42.604 ns]
test bench_buf_writer_1 ... ok
Benchmarking bench_buf_writer_10
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0034 s
> Found 13 outliers among 100 measurements (13.00%)
> 3 (3.00%) high mild
> 10 (10.00%) high severe
> Performing linear regression
> slope [1.2596 us 1.2637 us]
> R^2 0.9997687 0.9997639
> Estimating the statistics of the sample
> mean [1.2624 us 1.2700 us]
> median [1.2589 us 1.2606 us]
> MAD [2.9351 ns 5.4161 ns]
> SD [11.442 ns 26.284 ns]
test bench_buf_writer_10 ... ok
Benchmarking bench_buf_writer_10_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0021 s
> Found 11 outliers among 100 measurements (11.00%)
> 3 (3.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [1.2579 us 1.2603 us]
> R^2 0.9999421 0.9999412
> Estimating the statistics of the sample
> mean [1.2593 us 1.2660 us]
> median [1.2570 us 1.2591 us]
> MAD [2.9869 ns 5.3741 ns]
> SD [9.4955 ns 23.880 ns]
test bench_buf_writer_10_inline_always ... ok
Benchmarking bench_buf_writer_10_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0076 s
> Found 16 outliers among 100 measurements (16.00%)
> 1 (1.00%) low mild
> 4 (4.00%) high mild
> 11 (11.00%) high severe
> Performing linear regression
> slope [1.7032 us 1.7072 us]
> R^2 0.9999072 0.9999046
> Estimating the statistics of the sample
> mean [1.7054 us 1.7136 us]
> median [1.7018 us 1.7036 us]
> MAD [2.7653 ns 5.1513 ns]
> SD [12.739 ns 28.660 ns]
test bench_buf_writer_10_inline_never ... ok
Benchmarking bench_buf_writer_11
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0062 s
> Found 16 outliers among 100 measurements (16.00%)
> 3 (3.00%) high mild
> 13 (13.00%) high severe
> Performing linear regression
> slope [1.2579 us 1.2608 us]
> R^2 0.9997994 0.9997970
> Estimating the statistics of the sample
> mean [1.2637 us 1.2735 us]
> median [1.2573 us 1.2600 us]
> MAD [3.0399 ns 6.4134 ns]
> SD [17.710 ns 30.972 ns]
test bench_buf_writer_11 ... ok
Benchmarking bench_buf_writer_11_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0011 s
> Found 10 outliers among 100 measurements (10.00%)
> 2 (2.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [1.2564 us 1.2584 us]
> R^2 0.9999256 0.9999247
> Estimating the statistics of the sample
> mean [1.2619 us 1.2805 us]
> median [1.2559 us 1.2573 us]
> MAD [2.5291 ns 4.3400 ns]
> SD [29.205 ns 62.726 ns]
test bench_buf_writer_11_inline_always ... ok
Benchmarking bench_buf_writer_11_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 10 outliers among 100 measurements (10.00%)
> 1 (1.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [1.5750 us 1.5787 us]
> R^2 0.9999117 0.9999100
> Estimating the statistics of the sample
> mean [1.5773 us 1.6052 us]
> median [1.5731 us 1.5750 us]
> MAD [3.0479 ns 7.0869 ns]
> SD [14.553 ns 114.65 ns]
test bench_buf_writer_11_inline_never ... ok
Benchmarking bench_buf_writer_12
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0065 s
> Found 12 outliers among 100 measurements (12.00%)
> 4 (4.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [1.2978 us 1.2994 us]
> R^2 0.9999668 0.9999666
> Estimating the statistics of the sample
> mean [1.3000 us 1.3071 us]
> median [1.2968 us 1.2991 us]
> MAD [2.8177 ns 5.3050 ns]
> SD [10.094 ns 26.043 ns]
test bench_buf_writer_12 ... ok
Benchmarking bench_buf_writer_12_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0029 s
> Found 12 outliers among 100 measurements (12.00%)
> 2 (2.00%) high mild
> 10 (10.00%) high severe
> Performing linear regression
> slope [1.2965 us 1.2990 us]
> R^2 0.9999476 0.9999467
> Estimating the statistics of the sample
> mean [1.2996 us 1.3074 us]
> median [1.2971 us 1.2984 us]
> MAD [3.1216 ns 5.2430 ns]
> SD [10.005 ns 29.668 ns]
test bench_buf_writer_12_inline_always ... ok
Benchmarking bench_buf_writer_12_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0036 s
> Found 13 outliers among 100 measurements (13.00%)
> 4 (4.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [1.6243 us 1.6270 us]
> R^2 0.9999405 0.9999390
> Estimating the statistics of the sample
> mean [1.6284 us 1.6574 us]
> median [1.6236 us 1.6257 us]
> MAD [3.0080 ns 5.6185 ns]
> SD [15.199 ns 119.90 ns]
test bench_buf_writer_12_inline_never ... ok
Benchmarking bench_buf_writer_13
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0002 s
> Found 16 outliers among 100 measurements (16.00%)
> 3 (3.00%) high mild
> 13 (13.00%) high severe
> Performing linear regression
> slope [1.3073 us 1.3208 us]
> R^2 0.9980763 0.9980446
> Estimating the statistics of the sample
> mean [1.3049 us 1.3149 us]
> median [1.2982 us 1.3016 us]
> MAD [4.2287 ns 8.2613 ns]
> SD [18.083 ns 32.100 ns]
test bench_buf_writer_13 ... ok
Benchmarking bench_buf_writer_13_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0042 s
> Found 10 outliers among 100 measurements (10.00%)
> 3 (3.00%) high mild
> 7 (7.00%) high severe
> Performing linear regression
> slope [1.2979 us 1.2995 us]
> R^2 0.9999684 0.9999682
> Estimating the statistics of the sample
> mean [1.2998 us 1.3060 us]
> median [1.2969 us 1.2991 us]
> MAD [2.8304 ns 4.9926 ns]
> SD [9.5313 ns 21.218 ns]
test bench_buf_writer_13_inline_always ... ok
Benchmarking bench_buf_writer_13_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0041 s
> Found 16 outliers among 100 measurements (16.00%)
> 3 (3.00%) high mild
> 13 (13.00%) high severe
> Performing linear regression
> slope [1.5768 us 1.5798 us]
> R^2 0.9998141 0.9998130
> Estimating the statistics of the sample
> mean [1.5867 us 1.6290 us]
> median [1.5753 us 1.5766 us]
> MAD [2.3745 ns 5.1908 ns]
> SD [59.483 ns 147.10 ns]
test bench_buf_writer_13_inline_never ... ok
Benchmarking bench_buf_writer_1_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0018 s
> Found 9 outliers among 100 measurements (9.00%)
> 2 (2.00%) high mild
> 7 (7.00%) high severe
> Performing linear regression
> slope [371.20 ns 372.34 ns]
> R^2 0.9998188 0.9998133
> Estimating the statistics of the sample
> mean [371.94 ns 377.73 ns]
> median [371.02 ns 372.16 ns]
> MAD [1.5357 ns 2.4278 ns]
> SD [2.8484 ns 27.719 ns]
test bench_buf_writer_1_inline_always ... ok
Benchmarking bench_buf_writer_1_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0016 s
> Found 12 outliers among 100 measurements (12.00%)
> 2 (2.00%) high mild
> 10 (10.00%) high severe
> Performing linear regression
> slope [373.54 ns 374.16 ns]
> R^2 0.9996146 0.9996137
> Estimating the statistics of the sample
> mean [377.80 ns 395.30 ns]
> median [373.17 ns 374.03 ns]
> MAD [907.10 ps 1.7810 ns]
> SD [23.568 ns 60.863 ns]
test bench_buf_writer_1_inline_never ... ok
Benchmarking bench_buf_writer_2
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 12 outliers among 100 measurements (12.00%)
> 2 (2.00%) high mild
> 10 (10.00%) high severe
> Performing linear regression
> slope [316.26 ps 316.69 ps]
> R^2 0.9999682 0.9999671
> Estimating the statistics of the sample
> mean [316.73 ps 318.38 ps]
> median [316.11 ps 316.49 ps]
> MAD [0.5205 ps 0.9610 ps]
> SD [2.1853 ps 5.9017 ps]
test bench_buf_writer_2 ... ok
Benchmarking bench_buf_writer_2_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 8 outliers among 100 measurements (8.00%)
> 8 (8.00%) high severe
> Performing linear regression
> slope [316.62 ps 317.17 ps]
> R^2 0.9999379 0.9999374
> Estimating the statistics of the sample
> mean [317.12 ps 318.79 ps]
> median [316.22 ps 316.89 ps]
> MAD [0.6947 ps 1.5055 ps]
> SD [2.4298 ps 6.0649 ps]
test bench_buf_writer_2_inline_always ... ok
Benchmarking bench_buf_writer_2_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0015 s
> Found 12 outliers among 100 measurements (12.00%)
> 5 (5.00%) high mild
> 7 (7.00%) high severe
> Performing linear regression
> slope [414.81 ns 416.11 ns]
> R^2 0.9996735 0.9996682
> Estimating the statistics of the sample
> mean [416.71 ns 420.09 ns]
> median [415.01 ns 416.38 ns]
> MAD [1.7725 ns 3.2786 ns]
> SD [4.5142 ns 12.392 ns]
test bench_buf_writer_2_inline_never ... ok
Benchmarking bench_buf_writer_3
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0017 s
> Found 2 outliers among 100 measurements (2.00%)
> 2 (2.00%) high mild
> Performing linear regression
> slope [821.95 ns 827.79 ns]
> R^2 0.9991385 0.9991339
> Estimating the statistics of the sample
> mean [825.58 ns 831.13 ns]
> median [821.07 ns 832.48 ns]
> MAD [11.734 ns 19.798 ns]
> SD [11.969 ns 16.440 ns]
test bench_buf_writer_3 ... ok
Benchmarking bench_buf_writer_3_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0038 s
> Found 12 outliers among 100 measurements (12.00%)
> 2 (2.00%) low mild
> 4 (4.00%) high mild
> 6 (6.00%) high severe
> Performing linear regression
> slope [812.15 ns 813.69 ns]
> R^2 0.9999450 0.9999446
> Estimating the statistics of the sample
> mean [812.69 ns 816.18 ns]
> median [811.39 ns 812.65 ns]
> MAD [1.7523 ns 3.0664 ns]
> SD [4.1834 ns 13.836 ns]
test bench_buf_writer_3_inline_always ... ok
Benchmarking bench_buf_writer_3_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0007 s
> Found 13 outliers among 100 measurements (13.00%)
> 1 (1.00%) low mild
> 9 (9.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [1.0232 us 1.0251 us]
> R^2 0.9999369 0.9999359
> Estimating the statistics of the sample
> mean [1.0235 us 1.0267 us]
> median [1.0224 us 1.0233 us]
> MAD [1.8507 ns 3.5073 ns]
> SD [4.1503 ns 12.820 ns]
test bench_buf_writer_3_inline_never ... ok
Benchmarking bench_buf_writer_4
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0029 s
> Found 14 outliers among 100 measurements (14.00%)
> 4 (4.00%) low mild
> 4 (4.00%) high mild
> 6 (6.00%) high severe
> Performing linear regression
> slope [856.11 ns 860.13 ns]
> R^2 0.9983132 0.9982961
> Estimating the statistics of the sample
> mean [856.71 ns 868.72 ns]
> median [855.42 ns 856.89 ns]
> MAD [1.6416 ns 3.1021 ns]
> SD [4.0938 ns 58.167 ns]
test bench_buf_writer_4 ... ok
Benchmarking bench_buf_writer_4_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0034 s
> Found 12 outliers among 100 measurements (12.00%)
> 1 (1.00%) low mild
> 4 (4.00%) high mild
> 7 (7.00%) high severe
> Performing linear regression
> slope [856.67 ns 858.21 ns]
> R^2 0.9999102 0.9999089
> Estimating the statistics of the sample
> mean [856.83 ns 863.27 ns]
> median [855.64 ns 856.80 ns]
> MAD [1.8438 ns 3.4272 ns]
> SD [4.9134 ns 28.117 ns]
test bench_buf_writer_4_inline_always ... ok
Benchmarking bench_buf_writer_4_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0004 s
> Found 11 outliers among 100 measurements (11.00%)
> 2 (2.00%) low mild
> 3 (3.00%) high mild
> 6 (6.00%) high severe
> Performing linear regression
> slope [1.0272 us 1.0316 us]
> R^2 0.9995962 0.9995885
> Estimating the statistics of the sample
> mean [1.0283 us 1.0390 us]
> median [1.0253 us 1.0287 us]
> MAD [3.6962 ns 6.2155 ns]
> SD [8.9050 ns 45.692 ns]
test bench_buf_writer_4_inline_never ... ok
Benchmarking bench_buf_writer_5
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0020 s
> Found 11 outliers among 100 measurements (11.00%)
> 9 (9.00%) high mild
> 2 (2.00%) high severe
> Performing linear regression
> slope [419.77 ns 421.92 ns]
> R^2 0.9992167 0.9992048
> Estimating the statistics of the sample
> mean [420.88 ns 424.95 ns]
> median [418.33 ns 419.51 ns]
> MAD [2.1260 ns 4.1966 ns]
> SD [6.2390 ns 15.154 ns]
test bench_buf_writer_5 ... ok
Benchmarking bench_buf_writer_5_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0019 s
> Found 11 outliers among 100 measurements (11.00%)
> 2 (2.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [416.76 ns 417.73 ns]
> R^2 0.9998956 0.9998933
> Estimating the statistics of the sample
> mean [417.65 ns 424.16 ns]
> median [416.64 ns 417.32 ns]
> MAD [1.1276 ns 2.3170 ns]
> SD [3.3854 ns 30.627 ns]
test bench_buf_writer_5_inline_always ... ok
Benchmarking bench_buf_writer_5_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0003 s
> Found 9 outliers among 100 measurements (9.00%)
> 9 (9.00%) high severe
> Performing linear regression
> slope [457.61 ns 460.67 ns]
> R^2 0.9991274 0.9990857
> Estimating the statistics of the sample
> mean [461.52 ns 477.54 ns]
> median [457.08 ns 457.77 ns]
> MAD [1.0341 ns 1.7309 ns]
> SD [24.402 ns 53.912 ns]
test bench_buf_writer_5_inline_never ... ok
Benchmarking bench_buf_writer_6
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0003 s
> Found 13 outliers among 100 measurements (13.00%)
> 1 (1.00%) low mild
> 3 (3.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [370.38 ns 370.65 ns]
> R^2 0.9999763 0.9999762
> Estimating the statistics of the sample
> mean [371.29 ns 380.88 ns]
> median [370.30 ns 370.63 ns]
> MAD [518.89 ps 915.21 ps]
> SD [3.9500 ns 41.678 ns]
test bench_buf_writer_6 ... ok
Benchmarking bench_buf_writer_6_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0005 s
> Found 9 outliers among 100 measurements (9.00%)
> 1 (1.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [371.20 ns 371.96 ns]
> R^2 0.9998989 0.9998980
> Estimating the statistics of the sample
> mean [372.23 ns 377.93 ns]
> median [371.03 ns 371.76 ns]
> MAD [1.1235 ns 2.2498 ns]
> SD [3.3117 ns 24.568 ns]
test bench_buf_writer_6_inline_always ... ok
Benchmarking bench_buf_writer_6_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0004 s
> Found 11 outliers among 100 measurements (11.00%)
> 4 (4.00%) high mild
> 7 (7.00%) high severe
> Performing linear regression
> slope [372.87 ns 373.49 ns]
> R^2 0.9999536 0.9999521
> Estimating the statistics of the sample
> mean [373.64 ns 378.67 ns]
> median [372.68 ns 373.43 ns]
> MAD [779.28 ps 1.5860 ns]
> SD [2.6411 ns 23.341 ns]
test bench_buf_writer_6_inline_never ... ok
Benchmarking bench_buf_writer_7
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 8 outliers among 100 measurements (8.00%)
> 1 (1.00%) low mild
> 2 (2.00%) high mild
> 5 (5.00%) high severe
> Performing linear regression
> slope [324.09 ps 325.56 ps]
> R^2 0.9995937 0.9995938
> Estimating the statistics of the sample
> mean [324.63 ps 331.11 ps]
> median [323.38 ps 325.29 ps]
> MAD [2.5802 ps 4.2193 ps]
> SD [5.0028 ps 28.080 ps]
test bench_buf_writer_7 ... ok
Benchmarking bench_buf_writer_7_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 11 outliers among 100 measurements (11.00%)
> 2 (2.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [317.14 ps 318.47 ps]
> R^2 0.9996814 0.9996740
> Estimating the statistics of the sample
> mean [318.32 ps 326.31 ps]
> median [316.65 ps 318.07 ps]
> MAD [1.2638 ps 2.5855 ps]
> SD [4.0376 ps 36.041 ps]
test bench_buf_writer_7_inline_always ... ok
Benchmarking bench_buf_writer_7_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0021 s
> Found 13 outliers among 100 measurements (13.00%)
> 2 (2.00%) high mild
> 11 (11.00%) high severe
> Performing linear regression
> slope [1.0263 us 1.0312 us]
> R^2 0.9994624 0.9994534
> Estimating the statistics of the sample
> mean [1.0284 us 1.0589 us]
> median [1.0245 us 1.0268 us]
> MAD [3.4018 ns 5.9033 ns]
> SD [12.154 ns 133.76 ns]
test bench_buf_writer_7_inline_never ... ok
Benchmarking bench_buf_writer_8
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0028 s
> Found 11 outliers among 100 measurements (11.00%)
> 2 (2.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [854.08 ns 855.33 ns]
> R^2 0.9999573 0.9999566
> Estimating the statistics of the sample
> mean [855.71 ns 860.20 ns]
> median [853.50 ns 854.65 ns]
> MAD [1.5217 ns 2.7897 ns]
> SD [7.0060 ns 15.424 ns]
test bench_buf_writer_8 ... ok
Benchmarking bench_buf_writer_8_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0013 s
> Found 14 outliers among 100 measurements (14.00%)
> 6 (6.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [856.59 ns 857.82 ns]
> R^2 0.9998253 0.9998247
> Estimating the statistics of the sample
> mean [863.51 ns 889.26 ns]
> median [856.35 ns 857.84 ns]
> MAD [1.9168 ns 3.2128 ns]
> SD [37.060 ns 87.863 ns]
test bench_buf_writer_8_inline_always ... ok
Benchmarking bench_buf_writer_8_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0044 s
> Found 14 outliers among 100 measurements (14.00%)
> 1 (1.00%) low mild
> 7 (7.00%) high mild
> 6 (6.00%) high severe
> Performing linear regression
> slope [1.0241 us 1.0293 us]
> R^2 0.9996258 0.9996150
> Estimating the statistics of the sample
> mean [1.0238 us 1.0287 us]
> median [1.0219 us 1.0231 us]
> MAD [1.7992 ns 3.6329 ns]
> SD [6.1798 ns 18.619 ns]
test bench_buf_writer_8_inline_never ... ok
Benchmarking bench_buf_writer_9
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0038 s
> Found 4 outliers among 100 measurements (4.00%)
> 1 (1.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [858.99 ns 864.06 ns]
> R^2 0.9991703 0.9991571
> Estimating the statistics of the sample
> mean [861.53 ns 871.37 ns]
> median [855.92 ns 859.23 ns]
> MAD [2.7429 ns 7.2850 ns]
> SD [11.535 ns 39.357 ns]
test bench_buf_writer_9 ... ok
Benchmarking bench_buf_writer_9_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0030 s
> Found 16 outliers among 100 measurements (16.00%)
> 2 (2.00%) high mild
> 14 (14.00%) high severe
> Performing linear regression
> slope [858.44 ns 871.86 ns]
> R^2 0.9973356 0.9972622
> Estimating the statistics of the sample
> mean [859.22 ns 866.16 ns]
> median [855.80 ns 856.81 ns]
> MAD [1.6698 ns 3.0491 ns]
> SD [11.847 ns 22.651 ns]
test bench_buf_writer_9_inline_always ... ok
Benchmarking bench_buf_writer_9_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0049 s
> Found 9 outliers among 100 measurements (9.00%)
> 1 (1.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [1.0218 us 1.0227 us]
> R^2 0.9999824 0.9999824
> Estimating the statistics of the sample
> mean [1.0234 us 1.0296 us]
> median [1.0216 us 1.0228 us]
> MAD [1.7967 ns 3.1428 ns]
> SD [7.1153 ns 24.511 ns]
test bench_buf_writer_9_inline_never ... ok
Benchmarking bench_copy_nonoverlapping_memory
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 7 outliers among 100 measurements (7.00%)
> 3 (3.00%) high mild
> 4 (4.00%) high severe
> Performing linear regression
> slope [317.01 ps 317.89 ps]
> R^2 0.9998066 0.9998048
> Estimating the statistics of the sample
> mean [317.16 ps 318.71 ps]
> median [316.50 ps 317.40 ps]
> MAD [1.5291 ps 2.5353 ps]
> SD [2.3243 ps 5.5878 ps]
bench_copy_nonoverlapping_memory: Comparing with previous sample
> Performing a two-sample t-test
> H0: Both samples have the same mean
> p = 0.26131
> Can't reject the null hypothesis
> Estimating relative change of statistics
> mean [-0.1918% +0.6062%]
> median [+0.0301% +0.3301%]
test bench_copy_nonoverlapping_memory ... ok
Benchmarking bench_copy_nonoverlapping_memory_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 10 outliers among 100 measurements (10.00%)
> 2 (2.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [317.73 ps 320.26 ps]
> R^2 0.9982940 0.9982528
> Estimating the statistics of the sample
> mean [317.92 ps 322.60 ps]
> median [316.64 ps 317.47 ps]
> MAD [1.1734 ps 2.1565 ps]
> SD [4.4774 ps 18.587 ps]
bench_copy_nonoverlapping_memory_inline_always: Comparing with previous sample
> Performing a two-sample t-test
> H0: Both samples have the same mean
> p = 0.10184
> Can't reject the null hypothesis
> Estimating relative change of statistics
> mean [-0.0302% +1.4716%]
> median [-0.3516% +0.1537%]
test bench_copy_nonoverlapping_memory_inline_always ... ok
Benchmarking bench_copy_nonoverlapping_memory_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0017 s
> Found 18 outliers among 100 measurements (18.00%)
> 1 (1.00%) low severe
> 2 (2.00%) low mild
> 6 (6.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [371.32 ns 371.71 ns]
> R^2 0.9998571 0.9998569
> Estimating the statistics of the sample
> mean [373.39 ns 381.78 ns]
> median [371.11 ns 371.46 ns]
> MAD [465.87 ps 937.44 ps]
> SD [11.393 ns 29.233 ns]
bench_copy_nonoverlapping_memory_inline_never: Comparing with previous sample
> Performing a two-sample t-test
> H0: Both samples have the same mean
> p = 0.06706
> Can't reject the null hypothesis
^C
RUST_THREADS=1 cargo test -- --nocapture 2.31s user 0.09s system 0% cpu 12:28.18 total
ideapad  japaric  ~  tmp  serial  rm -rf .criterion  130   master
ideapad  japaric  ~  tmp  serial    master
ideapad  japaric  ~  tmp  serial  RUST_THREADS=1 cargo test -- --nocapture   master
ideapad  japaric  ~  tmp  serial  RUST_THREADS=1 cargo test -- --nocapture   master
Running target/serial-0112f1f92fb4eef6
running 80 tests
Benchmarking bench_buf_writer_0
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0057 s
> Found 13 outliers among 100 measurements (13.00%)
> 6 (6.00%) high mild
> 7 (7.00%) high severe
> Performing linear regression
> slope [1.5113 us 1.5226 us]
> R^2 0.9991090 0.9991045
> Estimating the statistics of the sample
> mean [1.5059 us 1.5141 us]
> median [1.4997 us 1.5037 us]
> MAD [3.9658 ns 9.2902 ns]
> SD [14.994 ns 26.065 ns]
test bench_buf_writer_0 ... ok
Benchmarking bench_buf_writer_0_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0016 s
> Found 2 outliers among 100 measurements (2.00%)
> 2 (2.00%) high severe
> Performing linear regression
> slope [1.5135 us 1.5244 us]
> R^2 0.9991604 0.9991658
> Estimating the statistics of the sample
> mean [1.5087 us 1.5180 us]
> median [1.5003 us 1.5054 us]
> MAD [5.0170 ns 12.468 ns]
> SD [17.259 ns 30.450 ns]
test bench_buf_writer_0_inline_always ... ok
Benchmarking bench_buf_writer_0_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0073 s
> Found 2 outliers among 100 measurements (2.00%)
> 2 (2.00%) high severe
> Performing linear regression
> slope [1.6367 us 1.6425 us]
> R^2 0.9998006 0.9997995
> Estimating the statistics of the sample
> mean [1.6379 us 1.6444 us]
> median [1.6362 us 1.6434 us]
> MAD [9.9067 ns 15.542 ns]
> SD [11.317 ns 21.660 ns]
test bench_buf_writer_0_inline_never ... ok
Benchmarking bench_buf_writer_1
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0015 s
> Found 4 outliers among 100 measurements (4.00%)
> 2 (2.00%) high mild
> 2 (2.00%) high severe
> Performing linear regression
> slope [373.59 ns 375.20 ns]
> R^2 0.9995107 0.9995051
> Estimating the statistics of the sample
> mean [373.48 ns 375.74 ns]
> median [372.28 ns 374.58 ns]
> MAD [2.9432 ns 4.6614 ns]
> SD [3.7765 ns 7.8603 ns]
test bench_buf_writer_1 ... ok
Benchmarking bench_buf_writer_10
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0021 s
> Found 12 outliers among 100 measurements (12.00%)
> 2 (2.00%) high mild
> 10 (10.00%) high severe
> Performing linear regression
> slope [1.2597 us 1.2655 us]
> R^2 0.9994213 0.9994096
> Estimating the statistics of the sample
> mean [1.2605 us 1.2675 us]
> median [1.2569 us 1.2598 us]
> MAD [3.6603 ns 6.7071 ns]
> SD [11.243 ns 23.784 ns]
test bench_buf_writer_10 ... ok
Benchmarking bench_buf_writer_10_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0021 s
> Found 12 outliers among 100 measurements (12.00%)
> 2 (2.00%) low mild
> 8 (8.00%) high mild
> 2 (2.00%) high severe
> Performing linear regression
> slope [1.2579 us 1.2605 us]
> R^2 0.9999367 0.9999356
> Estimating the statistics of the sample
> mean [1.2579 us 1.2608 us]
> median [1.2567 us 1.2584 us]
> MAD [2.5407 ns 4.8963 ns]
> SD [4.8657 ns 10.579 ns]
test bench_buf_writer_10_inline_always ... ok
Benchmarking bench_buf_writer_10_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0019 s
> Found 6 outliers among 100 measurements (6.00%)
> 1 (1.00%) low mild
> 1 (1.00%) high mild
> 4 (4.00%) high severe
> Performing linear regression
> slope [1.7052 us 1.7078 us]
> R^2 0.9999604 0.9999597
> Estimating the statistics of the sample
> mean [1.7062 us 1.7128 us]
> median [1.7043 us 1.7063 us]
> MAD [3.5648 ns 6.1032 ns]
> SD [6.2097 ns 27.507 ns]
test bench_buf_writer_10_inline_never ... ok
Benchmarking bench_buf_writer_11
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0021 s
> Found 7 outliers among 100 measurements (7.00%)
> 3 (3.00%) high mild
> 4 (4.00%) high severe
> Performing linear regression
> slope [1.2544 us 1.2576 us]
> R^2 0.9998591 0.9998569
> Estimating the statistics of the sample
> mean [1.2567 us 1.2626 us]
> median [1.2531 us 1.2570 us]
> MAD [3.6636 ns 7.6896 ns]
> SD [8.2241 ns 22.280 ns]
test bench_buf_writer_11 ... ok
Benchmarking bench_buf_writer_11_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0026 s
> Found 8 outliers among 100 measurements (8.00%)
> 5 (5.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [1.2595 us 1.2654 us]
> R^2 0.9997255 0.9997182
> Estimating the statistics of the sample
> mean [1.2600 us 1.2649 us]
> median [1.2568 us 1.2597 us]
> MAD [3.9277 ns 7.6075 ns]
> SD [8.0275 ns 17.753 ns]
test bench_buf_writer_11_inline_always ... ok
Benchmarking bench_buf_writer_11_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0059 s
> Found 14 outliers among 100 measurements (14.00%)
> 1 (1.00%) low mild
> 4 (4.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [1.5733 us 1.5772 us]
> R^2 0.9999044 0.9998982
> Estimating the statistics of the sample
> mean [1.5765 us 1.5948 us]
> median [1.5729 us 1.5749 us]
> MAD [2.4405 ns 4.4848 ns]
> SD [12.208 ns 81.277 ns]
test bench_buf_writer_11_inline_never ... ok
Benchmarking bench_buf_writer_12
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0050 s
> Found 7 outliers among 100 measurements (7.00%)
> 3 (3.00%) high mild
> 4 (4.00%) high severe
> Performing linear regression
> slope [1.3019 us 1.3061 us]
> R^2 0.9998374 0.9998314
> Estimating the statistics of the sample
> mean [1.3018 us 1.3079 us]
> median [1.3004 us 1.3035 us]
> MAD [4.9262 ns 7.9004 ns]
> SD [7.1082 ns 24.865 ns]
test bench_buf_writer_12 ... ok
Benchmarking bench_buf_writer_12_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0034 s
> Found 8 outliers among 100 measurements (8.00%)
> 3 (3.00%) high mild
> 5 (5.00%) high severe
> Performing linear regression
> slope [1.2969 us 1.3002 us]
> R^2 0.9998522 0.9998498
> Estimating the statistics of the sample
> mean [1.2989 us 1.3075 us]
> median [1.2959 us 1.2986 us]
> MAD [3.7822 ns 7.4218 ns]
> SD [8.0071 ns 36.717 ns]
test bench_buf_writer_12_inline_always ... ok
Benchmarking bench_buf_writer_12_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0081 s
> Found 13 outliers among 100 measurements (13.00%)
> 2 (2.00%) low mild
> 2 (2.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [1.6271 us 1.6444 us]
> R^2 0.9982752 0.9982266
> Estimating the statistics of the sample
> mean [1.6268 us 1.6412 us]
> median [1.6228 us 1.6240 us]
> MAD [2.2026 ns 4.7643 ns]
> SD [16.220 ns 55.820 ns]
test bench_buf_writer_12_inline_never ... ok
Benchmarking bench_buf_writer_13
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0029 s
> Found 13 outliers among 100 measurements (13.00%)
> 5 (5.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [1.2983 us 1.3006 us]
> R^2 0.9998707 0.9998696
> Estimating the statistics of the sample
> mean [1.3055 us 1.3315 us]
> median [1.2977 us 1.2993 us]
> MAD [2.7747 ns 5.0145 ns]
> SD [34.712 ns 93.635 ns]
test bench_buf_writer_13 ... ok
Benchmarking bench_buf_writer_13_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0058 s
> Found 13 outliers among 100 measurements (13.00%)
> 4 (4.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [1.2953 us 1.2989 us]
> R^2 0.9998601 0.9998566
> Estimating the statistics of the sample
> mean [1.2974 us 1.3067 us]
> median [1.2936 us 1.2951 us]
> MAD [1.7624 ns 3.7442 ns]
> SD [13.256 ns 32.104 ns]
test bench_buf_writer_13_inline_always ... ok
Benchmarking bench_buf_writer_13_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0050 s
> Found 11 outliers among 100 measurements (11.00%)
> 6 (6.00%) high mild
> 5 (5.00%) high severe
> Performing linear regression
> slope [1.5776 us 1.5829 us]
> R^2 0.9998094 0.9998054
> Estimating the statistics of the sample
> mean [1.5782 us 1.5948 us]
> median [1.5752 us 1.5776 us]
> MAD [3.4379 ns 6.5467 ns]
> SD [9.0494 ns 77.253 ns]
test bench_buf_writer_13_inline_never ... ok
Benchmarking bench_buf_writer_1_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0018 s
> Found 8 outliers among 100 measurements (8.00%)
> 2 (2.00%) low mild
> 3 (3.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [371.00 ns 372.13 ns]
> R^2 0.9998159 0.9998094
> Estimating the statistics of the sample
> mean [370.90 ns 375.36 ns]
> median [370.66 ns 370.98 ns]
> MAD [576.90 ps 1.2937 ns]
> SD [1.3204 ns 21.955 ns]
test bench_buf_writer_1_inline_always ... ok
Benchmarking bench_buf_writer_1_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0006 s
> Found 4 outliers among 100 measurements (4.00%)
> 4 (4.00%) high severe
> Performing linear regression
> slope [376.90 ns 380.23 ns]
> R^2 0.9988774 0.9988563
> Estimating the statistics of the sample
> mean [376.34 ns 379.17 ns]
> median [373.99 ns 375.37 ns]
> MAD [1.5816 ns 4.0813 ns]
> SD [5.0620 ns 9.2580 ns]
test bench_buf_writer_1_inline_never ... ok
Benchmarking bench_buf_writer_2
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 5 outliers among 100 measurements (5.00%)
> 2 (2.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [316.63 ps 317.81 ps]
> R^2 0.9995966 0.9995849
> Estimating the statistics of the sample
> mean [316.54 ps 318.26 ps]
> median [316.13 ps 316.57 ps]
> MAD [0.6290 ps 1.1992 ps]
> SD [1.2275 ps 6.7758 ps]
test bench_buf_writer_2 ... ok
Benchmarking bench_buf_writer_2_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 8 outliers among 100 measurements (8.00%)
> 2 (2.00%) low mild
> 2 (2.00%) high mild
> 4 (4.00%) high severe
> Performing linear regression
> slope [316.35 ps 316.95 ps]
> R^2 0.9999366 0.9999351
> Estimating the statistics of the sample
> mean [316.39 ps 317.65 ps]
> median [316.12 ps 316.47 ps]
> MAD [0.5425 ps 0.9874 ps]
> SD [0.9748 ps 4.9557 ps]
test bench_buf_writer_2_inline_always ... ok
Benchmarking bench_buf_writer_2_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0021 s
> Found 10 outliers among 100 measurements (10.00%)
> 1 (1.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [413.90 ns 414.62 ns]
> R^2 0.9999429 0.9999412
> Estimating the statistics of the sample
> mean [414.87 ns 425.35 ns]
> median [413.75 ns 414.06 ns]
> MAD [601.54 ps 1.0888 ns]
> SD [4.6244 ns 45.628 ns]
test bench_buf_writer_2_inline_never ... ok
Benchmarking bench_buf_writer_3
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0010 s
> Found 13 outliers among 100 measurements (13.00%)
> 3 (3.00%) high mild
> 10 (10.00%) high severe
> Performing linear regression
> slope [811.72 ns 813.34 ns]
> R^2 0.9999218 0.9999204
> Estimating the statistics of the sample
> mean [813.32 ns 817.00 ns]
> median [811.13 ns 812.33 ns]
> MAD [1.6138 ns 3.2165 ns]
> SD [6.2767 ns 12.105 ns]
test bench_buf_writer_3 ... ok
Benchmarking bench_buf_writer_3_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0035 s
> Found 9 outliers among 100 measurements (9.00%)
> 1 (1.00%) low mild
> 5 (5.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [811.22 ns 812.62 ns]
> R^2 0.9999436 0.9999426
> Estimating the statistics of the sample
> mean [811.18 ns 814.04 ns]
> median [810.57 ns 811.41 ns]
> MAD [1.5554 ns 3.1746 ns]
> SD [2.9319 ns 11.921 ns]
test bench_buf_writer_3_inline_always ... ok
Benchmarking bench_buf_writer_3_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0005 s
> Found 11 outliers among 100 measurements (11.00%)
> 3 (3.00%) high mild
> 8 (8.00%) high severe
> Performing linear regression
> slope [1.0256 us 1.0358 us]
> R^2 0.9982481 0.9982065
> Estimating the statistics of the sample
> mean [1.0257 us 1.0375 us]
> median [1.0224 us 1.0241 us]
> MAD [2.2120 ns 4.6839 ns]
> SD [11.706 ns 47.411 ns]
test bench_buf_writer_3_inline_never ... ok
Benchmarking bench_buf_writer_4
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0024 s
> Found 16 outliers among 100 measurements (16.00%)
> 3 (3.00%) high mild
> 13 (13.00%) high severe
> Performing linear regression
> slope [858.17 ns 864.84 ns]
> R^2 0.9991160 0.9990884
> Estimating the statistics of the sample
> mean [859.23 ns 865.26 ns]
> median [855.88 ns 857.57 ns]
> MAD [2.2412 ns 4.1428 ns]
> SD [9.7263 ns 21.007 ns]
test bench_buf_writer_4 ... ok
Benchmarking bench_buf_writer_4_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0011 s
> Found 8 outliers among 100 measurements (8.00%)
> 7 (7.00%) high mild
> 1 (1.00%) high severe
> Performing linear regression
> slope [859.16 ns 862.82 ns]
> R^2 0.9992589 0.9992481
> Estimating the statistics of the sample
> mean [864.81 ns 871.87 ns]
> median [858.37 ns 862.73 ns]
> MAD [3.9865 ns 10.406 ns]
> SD [13.664 ns 21.786 ns]
test bench_buf_writer_4_inline_always ... ok
Benchmarking bench_buf_writer_4_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0014 s
> Found 6 outliers among 100 measurements (6.00%)
> 3 (3.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [1.0298 us 1.0348 us]
> R^2 0.9993284 0.9993211
> Estimating the statistics of the sample
> mean [1.0293 us 1.0382 us]
> median [1.0254 us 1.0289 us]
> MAD [3.8879 ns 8.4011 ns]
> SD [9.4369 ns 33.019 ns]
test bench_buf_writer_4_inline_never ... ok
Benchmarking bench_buf_writer_5
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0019 s
> Found 9 outliers among 100 measurements (9.00%)
> 2 (2.00%) low mild
> 3 (3.00%) high mild
> 4 (4.00%) high severe
> Performing linear regression
> slope [416.37 ns 417.00 ns]
> R^2 0.9999504 0.9999500
> Estimating the statistics of the sample
> mean [416.43 ns 417.92 ns]
> median [416.02 ns 416.73 ns]
> MAD [990.32 ps 1.7136 ns]
> SD [1.6876 ns 5.9493 ns]
test bench_buf_writer_5 ... ok
Benchmarking bench_buf_writer_5_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0014 s
> Found 5 outliers among 100 measurements (5.00%)
> 2 (2.00%) low mild
> 1 (1.00%) high mild
> 2 (2.00%) high severe
> Performing linear regression
> slope [416.32 ns 416.88 ns]
> R^2 0.9999618 0.9999614
> Estimating the statistics of the sample
> mean [416.43 ns 417.65 ns]
> median [416.03 ns 417.00 ns]
> MAD [1.0325 ns 1.8527 ns]
> SD [1.4719 ns 4.9026 ns]
test bench_buf_writer_5_inline_always ... ok
Benchmarking bench_buf_writer_5_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0008 s
> Found 13 outliers among 100 measurements (13.00%)
> 6 (6.00%) high mild
> 7 (7.00%) high severe
> Performing linear regression
> slope [462.88 ns 468.02 ns]
> R^2 0.9971160 0.9970732
> Estimating the statistics of the sample
> mean [462.22 ns 467.39 ns]
> median [458.43 ns 460.30 ns]
> MAD [2.1470 ns 5.5330 ns]
> SD [9.1740 ns 16.844 ns]
test bench_buf_writer_5_inline_never ... ok
Benchmarking bench_buf_writer_6
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0017 s
> Found 10 outliers among 100 measurements (10.00%)
> 7 (7.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [375.90 ns 382.27 ns]
> R^2 0.9945761 0.9944461
> Estimating the statistics of the sample
> mean [378.80 ns 384.00 ns]
> median [374.81 ns 379.84 ns]
> MAD [6.0677 ns 11.409 ns]
> SD [9.7198 ns 16.514 ns]
test bench_buf_writer_6 ... ok
Benchmarking bench_buf_writer_6_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0016 s
> Found 2 outliers among 100 measurements (2.00%)
> 2 (2.00%) high severe
> Performing linear regression
> slope [372.70 ns 374.70 ns]
> R^2 0.9993210 0.9993083
> Estimating the statistics of the sample
> mean [374.89 ns 378.92 ns]
> median [372.03 ns 376.57 ns]
> MAD [2.5411 ns 7.5113 ns]
> SD [4.8749 ns 15.971 ns]
test bench_buf_writer_6_inline_always ... ok
Benchmarking bench_buf_writer_6_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0014 s
> Found 13 outliers among 100 measurements (13.00%)
> 8 (8.00%) high mild
> 5 (5.00%) high severe
> Performing linear regression
> slope [373.89 ns 375.01 ns]
> R^2 0.9998540 0.9998528
> Estimating the statistics of the sample
> mean [374.16 ns 379.04 ns]
> median [373.37 ns 374.05 ns]
> MAD [910.99 ps 1.5142 ns]
> SD [2.0418 ns 21.431 ns]
test bench_buf_writer_6_inline_never ... ok
Benchmarking bench_buf_writer_7
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 7 outliers among 100 measurements (7.00%)
> 1 (1.00%) low mild
> 3 (3.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [323.41 ps 324.97 ps]
> R^2 0.9994946 0.9994904
> Estimating the statistics of the sample
> mean [323.74 ps 328.71 ps]
> median [322.72 ps 324.43 ps]
> MAD [2.3872 ps 4.2842 ps]
> SD [3.9250 ps 20.530 ps]
test bench_buf_writer_7 ... ok
Benchmarking bench_buf_writer_7_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 9 outliers among 100 measurements (9.00%)
> 3 (3.00%) high mild
> 6 (6.00%) high severe
> Performing linear regression
> slope [326.35 ps 328.86 ps]
> R^2 0.9983773 0.9983635
> Estimating the statistics of the sample
> mean [326.79 ps 332.29 ps]
> median [324.50 ps 327.48 ps]
> MAD [3.6394 ps 6.3551 ps]
> SD [7.6796 ps 19.737 ps]
test bench_buf_writer_7_inline_always ... ok
Benchmarking bench_buf_writer_7_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0014 s
> Found 15 outliers among 100 measurements (15.00%)
> 4 (4.00%) low mild
> 8 (8.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [1.0212 us 1.0226 us]
> R^2 0.9999678 0.9999675
> Estimating the statistics of the sample
> mean [1.0209 us 1.0239 us]
> median [1.0205 us 1.0215 us]
> MAD [1.8025 ns 3.3119 ns]
> SD [3.4571 ns 12.236 ns]
test bench_buf_writer_7_inline_never ... ok
Benchmarking bench_buf_writer_8
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0040 s
> Found 6 outliers among 100 measurements (6.00%)
> 4 (4.00%) high mild
> 2 (2.00%) high severe
> Performing linear regression
> slope [858.44 ns 861.64 ns]
> R^2 0.9997829 0.9997832
> Estimating the statistics of the sample
> mean [857.11 ns 865.67 ns]
> median [855.64 ns 856.84 ns]
> MAD [2.4856 ns 4.5416 ns]
> SD [4.3769 ns 41.130 ns]
test bench_buf_writer_8 ... ok
Benchmarking bench_buf_writer_8_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0025 s
> Found 15 outliers among 100 measurements (15.00%)
> 1 (1.00%) low mild
> 1 (1.00%) high mild
> 13 (13.00%) high severe
> Performing linear regression
> slope [856.13 ns 856.85 ns]
> R^2 0.9999621 0.9999619
> Estimating the statistics of the sample
> mean [857.84 ns 862.24 ns]
> median [855.76 ns 856.45 ns]
> MAD [1.0326 ns 1.8931 ns]
> SD [7.0126 ns 15.120 ns]
test bench_buf_writer_8_inline_always ... ok
Benchmarking bench_buf_writer_8_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0029 s
> Found 12 outliers among 100 measurements (12.00%)
> 2 (2.00%) low mild
> 1 (1.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [1.0212 us 1.0221 us]
> R^2 0.9999834 0.9999832
> Estimating the statistics of the sample
> mean [1.0224 us 1.0265 us]
> median [1.0209 us 1.0220 us]
> MAD [1.3804 ns 2.3645 ns]
> SD [5.6640 ns 14.907 ns]
test bench_buf_writer_8_inline_never ... ok
Benchmarking bench_buf_writer_9
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0010 s
> Found 14 outliers among 100 measurements (14.00%)
> 5 (5.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [856.47 ns 858.31 ns]
> R^2 0.9999322 0.9999310
> Estimating the statistics of the sample
> mean [858.07 ns 862.69 ns]
> median [855.84 ns 857.44 ns]
> MAD [1.9226 ns 3.6197 ns]
> SD [7.0032 ns 16.401 ns]
test bench_buf_writer_9 ... ok
Benchmarking bench_buf_writer_9_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0004 s
> Found 3 outliers among 100 measurements (3.00%)
> 3 (3.00%) high mild
> Performing linear regression
> slope [867.03 ns 874.38 ns]
> R^2 0.9988508 0.9988342
> Estimating the statistics of the sample
> mean [870.39 ns 876.65 ns]
> median [863.26 ns 877.31 ns]
> MAD [8.7926 ns 22.643 ns]
> SD [13.145 ns 18.969 ns]
test bench_buf_writer_9_inline_always ... ok
Benchmarking bench_buf_writer_9_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0021 s
> Found 9 outliers among 100 measurements (9.00%)
> 1 (1.00%) low mild
> 7 (7.00%) high mild
> 1 (1.00%) high severe
> Performing linear regression
> slope [1.0238 us 1.0257 us]
> R^2 0.9999404 0.9999400
> Estimating the statistics of the sample
> mean [1.0236 us 1.0275 us]
> median [1.0224 us 1.0243 us]
> MAD [2.9342 ns 5.0721 ns]
> SD [4.4163 ns 16.466 ns]
test bench_buf_writer_9_inline_never ... ok
Benchmarking bench_copy_nonoverlapping_memory
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 9 outliers among 100 measurements (9.00%)
> 8 (8.00%) high mild
> 1 (1.00%) high severe
> Performing linear regression
> slope [317.55 ps 318.70 ps]
> R^2 0.9997876 0.9997857
> Estimating the statistics of the sample
> mean [317.97 ps 320.38 ps]
> median [317.01 ps 317.91 ps]
> MAD [1.7540 ps 3.0552 ps]
> SD [3.0316 ps 9.5043 ps]
test bench_copy_nonoverlapping_memory ... ok
Benchmarking bench_copy_nonoverlapping_memory_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Found 6 outliers among 100 measurements (6.00%)
> 5 (5.00%) high mild
> 1 (1.00%) high severe
> Performing linear regression
> slope [317.50 ps 318.49 ps]
> R^2 0.9998604 0.9998610
> Estimating the statistics of the sample
> mean [317.16 ps 318.57 ps]
> median [316.59 ps 317.47 ps]
> MAD [1.0755 ps 2.0042 ps]
> SD [1.6473 ps 5.8108 ps]
test bench_copy_nonoverlapping_memory_inline_always ... ok
Benchmarking bench_copy_nonoverlapping_memory_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0018 s
> Found 11 outliers among 100 measurements (11.00%)
> 3 (3.00%) low mild
> 5 (5.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [371.68 ns 372.48 ns]
> R^2 0.9999273 0.9999255
> Estimating the statistics of the sample
> mean [371.63 ns 374.29 ns]
> median [371.31 ns 371.86 ns]
> MAD [895.91 ps 1.6686 ns]
> SD [1.5266 ns 12.460 ns]
test bench_copy_nonoverlapping_memory_inline_never ... ok
Benchmarking bench_slice_writer
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0074 s
> Found 16 outliers among 100 measurements (16.00%)
> 3 (3.00%) low mild
> 4 (4.00%) high mild
> 9 (9.00%) high severe
> Performing linear regression
> slope [1.5013 us 1.5081 us]
> R^2 0.9996758 0.9996663
> Estimating the statistics of the sample
> mean [1.5013 us 1.5189 us]
> median [1.4994 us 1.5009 us]
> MAD [2.3993 ns 4.1463 ns]
> SD [8.3074 ns 83.952 ns]
test bench_slice_writer ... ok
Benchmarking bench_slice_writer_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0048 s
> Found 3 outliers among 100 measurements (3.00%)
> 2 (2.00%) high mild
> 1 (1.00%) high severe
> Performing linear regression
> slope [1.4993 us 1.5024 us]
> R^2 0.9999366 0.9999361
> Estimating the statistics of the sample
> mean [1.4981 us 1.5038 us]
> median [1.4964 us 1.4990 us]
> MAD [3.9567 ns 6.6653 ns]
> SD [5.0580 ns 24.572 ns]
test bench_slice_writer_inline_always ... ok
Benchmarking bench_slice_writer_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0026 s
> Found 3 outliers among 100 measurements (3.00%)
> 2 (2.00%) high mild
> 1 (1.00%) high severe
> Performing linear regression
> slope [1.6315 us 1.6354 us]
> R^2 0.9999031 0.9999025
> Estimating the statistics of the sample
> mean [1.6312 us 1.6367 us]
> median [1.6288 us 1.6347 us]
> MAD [7.7098 ns 11.861 ns]
> SD [8.7410 ns 20.242 ns]
test bench_slice_writer_inline_never ... ok
Benchmarking bench_std_buf_writer
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0032 s
> Found 11 outliers among 100 measurements (11.00%)
> 5 (5.00%) low mild
> 2 (2.00%) high mild
> 4 (4.00%) high severe
> Performing linear regression
> slope [810.75 ns 811.51 ns]
> R^2 0.9999791 0.9999789
> Estimating the statistics of the sample
> mean [810.52 ns 813.09 ns]
> median [810.36 ns 811.12 ns]
> MAD [1.0364 ns 2.1749 ns]
> SD [2.1682 ns 11.028 ns]
test bench_std_buf_writer ... ok
Benchmarking bench_std_buf_writer_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0030 s
> Found 18 outliers among 100 measurements (18.00%)
> 2 (2.00%) high mild
> 16 (16.00%) high severe
> Performing linear regression
> slope [813.23 ns 819.02 ns]
> R^2 0.9984657 0.9984402
> Estimating the statistics of the sample
> mean [815.87 ns 823.31 ns]
> median [810.64 ns 813.42 ns]
> MAD [2.5722 ns 5.0314 ns]
> SD [13.744 ns 23.535 ns]
test bench_std_buf_writer_inline_always ... ok
Benchmarking bench_std_buf_writer_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0045 s
> Found 14 outliers among 100 measurements (14.00%)
> 1 (1.00%) low mild
> 2 (2.00%) high mild
> 11 (11.00%) high severe
> Performing linear regression
> slope [1.0269 us 1.0376 us]
> R^2 0.9984703 0.9984360
> Estimating the statistics of the sample
> mean [1.0254 us 1.0353 us]
> median [1.0224 us 1.0242 us]
> MAD [2.4162 ns 4.3740 ns]
> SD [9.6414 ns 40.078 ns]
test bench_std_buf_writer_inline_never ... ok
Benchmarking bench_std_vec_writer
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0004 s
> Found 5 outliers among 100 measurements (5.00%)
> 2 (2.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [2.0518 us 2.0657 us]
> R^2 0.9986859 0.9986689
> Estimating the statistics of the sample
> mean [2.0674 us 2.0982 us]
> median [2.0496 us 2.0768 us]
> MAD [29.644 ns 50.938 ns]
> SD [38.944 ns 118.25 ns]
test bench_std_vec_writer ... ok
Benchmarking bench_std_vec_writer_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0039 s
> Found 16 outliers among 100 measurements (16.00%)
> 2 (2.00%) high mild
> 14 (14.00%) high severe
> Performing linear regression
> slope [2.0273 us 2.0366 us]
> R^2 0.9993252 0.9993130
> Estimating the statistics of the sample
> mean [2.0346 us 2.0641 us]
> median [2.0254 us 2.0307 us]
> MAD [6.3702 ns 12.473 ns]
> SD [22.908 ns 124.78 ns]
test bench_std_vec_writer_inline_always ... ok
Benchmarking bench_std_vec_writer_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0024 s
> Found 8 outliers among 100 measurements (8.00%)
> 1 (1.00%) low mild
> 2 (2.00%) high mild
> 5 (5.00%) high severe
> Performing linear regression
> slope [2.0483 us 2.0579 us]
> R^2 0.9997421 0.9997364
> Estimating the statistics of the sample
> mean [2.0463 us 2.0618 us]
> median [2.0425 us 2.0484 us]
> MAD [5.5639 ns 10.468 ns]
> SD [11.164 ns 68.596 ns]
test bench_std_vec_writer_inline_never ... ok
Benchmarking bench_unsafe_writer
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Performing linear regression
> slope [377.89 ps 393.23 ps]
> R^2 0.9748194 0.9748716
> Estimating the statistics of the sample
> mean [372.01 ps 385.50 ps]
> median [367.50 ps 387.51 ps]
> MAD [27.384 ps 44.757 ps]
> SD [30.339 ps 38.558 ps]
test bench_unsafe_writer ... ok
Benchmarking bench_unsafe_writer_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0000 s
> Performing linear regression
> slope [344.80 ps 369.31 ps]
> R^2 0.9136872 0.9123885
> Estimating the statistics of the sample
> mean [353.57 ps 373.67 ps]
> median [321.73 ps 366.39 ps]
> MAD [10.036 ps 71.833 ps]
> SD [47.184 ps 54.575 ps]
test bench_unsafe_writer_inline_always ... ok
Benchmarking bench_unsafe_writer_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0008 s
> Found 15 outliers among 100 measurements (15.00%)
> 2 (2.00%) high mild
> 13 (13.00%) high severe
> Performing linear regression
> slope [373.52 ns 376.77 ns]
> R^2 0.9984702 0.9984417
> Estimating the statistics of the sample
> mean [373.88 ns 377.15 ns]
> median [372.29 ns 373.07 ns]
> MAD [1.0135 ns 1.9839 ns]
> SD [4.6681 ns 11.713 ns]
test bench_unsafe_writer_inline_never ... ok
Benchmarking bench_vec_writer_1
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0051 s
> Found 10 outliers among 100 measurements (10.00%)
> 7 (7.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [1.8302 us 1.8371 us]
> R^2 0.9997916 0.9997857
> Estimating the statistics of the sample
> mean [1.8306 us 1.8378 us]
> median [1.8267 us 1.8315 us]
> MAD [5.9351 ns 10.749 ns]
> SD [11.178 ns 24.975 ns]
test bench_vec_writer_1 ... ok
Benchmarking bench_vec_writer_1_inline_always
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0081 s
> Found 10 outliers among 100 measurements (10.00%)
> 3 (3.00%) low mild
> 4 (4.00%) high mild
> 3 (3.00%) high severe
> Performing linear regression
> slope [1.8236 us 1.8266 us]
> R^2 0.9999552 0.9999541
> Estimating the statistics of the sample
> mean [1.8232 us 1.8259 us]
> median [1.8222 us 1.8246 us]
> MAD [3.1562 ns 5.0183 ns]
> SD [5.2079 ns 8.5488 ns]
test bench_vec_writer_1_inline_always ... ok
Benchmarking bench_vec_writer_1_inline_never
> Warming up for 3.0000 s
> Collecting 100 samples in estimated 5.0083 s
> Found 12 outliers among 100 measurements (12.00%)
> 2 (2.00%) low mild
> 5 (5.00%) high mild
> 5 (5.00%) high severe
> Performing linear regression
> slope [1.8305 us 1.8367 us]
> R^2 0.9998152 0.9998124
> Estimating the statistics of the sample
> mean [1.8294 us 1.8348 us]
> median [1.8269 us 1.8296 us]
> MAD [4.1731 ns 8.3000 ns]
> SD [9.8276 ns 17.393 ns]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment