Skip to content

Instantly share code, notes, and snippets.

@bluss
bluss / float_fast.s
Last active December 11, 2016 12:16
Compiler output using `rustc -Copt-level=3 -Ctarget-cpu=native --emit=asm float_fast.rs -Cllvm-args=-x86-asm-syntax=intel`
.text
.intel_syntax noprefix
.file "float_fast.cgu-0.rs"
.section .text.dot3_fast,"ax",@progbits
.globl dot3_fast
.p2align 4, 0x90
.type dot3_fast,@function
dot3_fast:
.cfi_startproc
cmp rcx, r9
// MIR for `id_option`
// node_id = 4
// pass_name = CopyPropagation
// disambiguator = after
fn id_option(_1: std::option::Option<u32>) -> std::option::Option<u32> {
let mut _0: std::option::Option<u32>; // return pointer
scope 1 {
let _2: std::option::Option<u32>; // "a" in scope 1 at id.rs:6:18: 6:19
scope 2 {
#![crate_type="lib"]
#[no_mangle]
pub fn id_option(a: Option<u32>) -> Option<u32> {
match a {
Some(x) => Some(x),
None => None,
}
}
#![crate_type="lib"]
#[no_mangle]
pub fn id_option(a: Option<u32>) -> Option<u32> {
match a {
Some(x) => Some(x),
None => None,
}
}
; 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" }
#![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]);
//! ```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 std::mem::size_of_val;
use test::Bencher;
#[bench]