diff --git a/cilly/src/bin/linker/main.rs b/cilly/src/bin/linker/main.rs index d79e6ffd..62d10cf4 100644 --- a/cilly/src/bin/linker/main.rs +++ b/cilly/src/bin/linker/main.rs @@ -4,7 +4,7 @@ use cilly::{ asm::DEAD_CODE_ELIMINATION, call_site::CallSite, conv_usize, - libc_fns::{LIBC_FNS, LIBC_MODIFIES_ERRNO}, + libc_fns::{self, LIBC_FNS, LIBC_MODIFIES_ERRNO}, v2::{ asm::{MissingMethodPatcher, ILASM_FLAVOUR}, cilnode::MethodKind, @@ -175,12 +175,20 @@ fn main() { || output_file_path.contains(".so") || output_file_path.contains(".o"); - let externs = LIBC_FNS + let mut externs: FxHashMap<_, _> = LIBC_FNS .iter() - .map(|fn_name| (*fn_name, LIBC.as_ref())) + .map(|fn_name| (*fn_name, LIBC.to_string())) .collect(); let modifies_errno = LIBC_MODIFIES_ERRNO.iter().copied().collect(); + if let Some(f128_support) = libc_fns::f128_support_lib() { + let f128_support = f128_support.to_str().to_owned().unwrap(); + externs.extend( + libc_fns::F128_SYMBOLS + .iter() + .map(|fn_name| (*fn_name, f128_support.to_owned())), + ); + } let mut overrides: MissingMethodPatcher = FxHashMap::default(); overrides.insert( final_assembly.alloc_string("pthread_atfork"), @@ -351,7 +359,7 @@ fn main() { println!("Eliminating dead code"); final_assembly.eliminate_dead_code(); } - let mut fuel = final_assembly.fuel_from_env(); + let mut fuel = final_assembly.fuel_from_env().scale(0.1); final_assembly.opt(&mut fuel); final_assembly .save_tmp(&mut std::fs::File::create(path.with_extension("cilly2")).unwrap()) @@ -443,7 +451,7 @@ fn bootstrap_source(fpath: &Path, output_file_path: &str, jumpstart_cmd: &str) - IlasmFlavour::Clasic => String::new(), IlasmFlavour::Modern => format!( "{output_file_path}.pdb", - output_file_path = fpath.file_name().unwrap().to_string_lossy() + output_file_path = fpath.file_stem().unwrap().to_string_lossy() ), }, native_companion_file = if *NATIVE_PASSTROUGH { diff --git a/cilly/src/cil_root.rs b/cilly/src/cil_root.rs index 1e041c73..99cfb90c 100644 --- a/cilly/src/cil_root.rs +++ b/cilly/src/cil_root.rs @@ -850,10 +850,12 @@ impl CILRoot { )) } }; - if **inner != **tpe && !matches!(inner.as_ref(), Type::I128 | Type::U128) { + if **inner != **tpe + && !matches!(inner.as_ref(), Type::I128 | Type::U128 | Type::F128) + { Err(format!("Can't indirectly set a value of type {tpe:?} because the pointer points to {inner:?}, and it should point to {tpe:?}"))?; } - if **inner != value_calc { + if **inner != value_calc && !(value_calc == Type::I128 && **inner == Type::F128) { Err(format!("Can't indirectly set a value of type {tpe:?} because the provided value is {value_calc:?}, and it should be {inner:?}")) } else { Ok(()) diff --git a/cilly/src/lib.rs b/cilly/src/lib.rs index 960ab082..3d764726 100644 --- a/cilly/src/lib.rs +++ b/cilly/src/lib.rs @@ -99,6 +99,7 @@ pub fn mangle(tpe: &Type) -> std::borrow::Cow<'static, str> { Type::F16 => "f16".into(), Type::F32 => "f32".into(), Type::F64 => "f64".into(), + Type::F128 => "f128".into(), Type::Ptr(inner) => format!("p{inner}", inner = mangle(inner,)).into(), Type::DotnetType(tpe) => { assert!( diff --git a/cilly/src/libc_fns.rs b/cilly/src/libc_fns.rs index 61b063e1..4a0aed33 100644 --- a/cilly/src/libc_fns.rs +++ b/cilly/src/libc_fns.rs @@ -1,3 +1,4 @@ +use std::path::PathBuf; /// A list of all functions which are redirected to system libc. pub const LIBC_FNS: &[&str] = &[ "__errno_location", @@ -673,7 +674,35 @@ pub const LIBM_FNS: &[&str] = &[ "log1pf", "tgamma", "tgammaf", + "fmodl", ]; +pub const F128_SYMBOLS: &[&str] = &[ + "__addtf3", "__subtf3", "__multf3", "__divtf3", "__eqtf2", "__netf2", "__getf2", "__lttf2", + "__letf2", "__gttf2", +]; +#[cfg(all(target_os = "linux", target_env = "gnu"))] +// TODO: this is not portable at all. +pub fn f128_support_lib() -> Option { + // 1st. Open `/usr/lib/`. + + let dir = std::fs::read_dir("/usr/lib64").expect("No `/usr/lib64`"); + // 2nd Iterate trough all files there, and search for the GNU `libgcc_s`, where the f128 support is located. + for entry in dir { + let entry = entry.unwrap(); + let name = entry.file_name(); + let Some(name) = name.to_str() else { + continue; + }; + if name.contains("libgcc_s") && entry.metadata().unwrap().is_file() { + return Some(entry.path()); + } + } + None +} +#[cfg(not(all(target_os = "linux", target_env = "gnu")))] +pub fn f128_support() -> Option { + None +} /* "pthread_atfork", "pthread_attr_destroy", diff --git a/cilly/src/type.rs b/cilly/src/type.rs index 6eeae002..436bc952 100644 --- a/cilly/src/type.rs +++ b/cilly/src/type.rs @@ -11,6 +11,7 @@ pub enum Type { F16, F32, F64, + F128, // Unsigned intiegers U8, U16, diff --git a/cilly/src/v2/asm.rs b/cilly/src/v2/asm.rs index e75969bd..ce30956f 100644 --- a/cilly/src/v2/asm.rs +++ b/cilly/src/v2/asm.rs @@ -1,6 +1,5 @@ use super::{ bimap::{calculate_hash, BiMap, BiMapIndex, IntoBiMapIndex}, - cache::{CachedAssemblyInfo, NonMaxU32, StackUsage}, cilnode::{BinOp, MethodKind, UnOp}, opt::{OptFuel, SideEffectInfoCache}, Access, CILNode, CILRoot, ClassDef, ClassDefIdx, ClassRef, ClassRefIdx, Const, Exporter, @@ -548,6 +547,11 @@ impl Assembly { if let Some(cref) = self.class_ref_to_def(rust_void) { previosly_ressurected.insert(cref); } + let f128 = self.alloc_string("f128"); + let f128 = self.alloc_class_ref(ClassRef::new(f128, None, true, vec![].into())); + if let Some(cref) = self.class_ref_to_def(f128) { + previosly_ressurected.insert(cref); + } let mut to_resurrect: FxHashSet = FxHashSet::default(); let mut alive: FxHashSet = FxHashSet::default(); @@ -603,7 +607,7 @@ impl Assembly { pub fn patch_missing_methods( &mut self, - externs: FxHashMap<&str, &str>, + externs: FxHashMap<&str, String>, modifies_errno: FxHashSet<&str>, override_methods: MissingMethodPatcher, ) { diff --git a/cilly/src/v2/builtins/atomics.rs b/cilly/src/v2/builtins/atomics.rs index 2c6d8707..26074827 100644 --- a/cilly/src/v2/builtins/atomics.rs +++ b/cilly/src/v2/builtins/atomics.rs @@ -1,6 +1,6 @@ use crate::v2::{ asm::MissingMethodPatcher, cilnode::MethodKind, cilroot::BranchCond, BasicBlock, BinOp, - CILNode, CILRoot, ClassRef, Const, Int, MethodDef, MethodImpl, MethodRef, Type, + CILNode, CILRoot, ClassRef, Const, Int, MethodImpl, MethodRef, Type, }; use super::{ diff --git a/cilly/src/v2/c_exporter/mod.rs b/cilly/src/v2/c_exporter/mod.rs index feb68b04..6d0ffef4 100644 --- a/cilly/src/v2/c_exporter/mod.rs +++ b/cilly/src/v2/c_exporter/mod.rs @@ -11,14 +11,10 @@ use super::{ pub struct CExporter { is_lib: bool, - } impl CExporter { pub fn new(is_lib: bool) -> Self { - Self { - is_lib, - - } + Self { is_lib } } fn export_class( &self, @@ -27,8 +23,8 @@ impl CExporter { method_decls: &mut impl Write, method_defs: &mut impl Write, type_defs: &mut impl Write, - defined_types: &mut FxHashSet , - delayed_defs: &mut FxHashSet + defined_types: &mut FxHashSet, + delayed_defs: &mut FxHashSet, ) -> std::io::Result<()> { todo!(); } @@ -46,11 +42,11 @@ impl CExporter { &mut method_defs, &mut type_defs, &mut defined_types, - &mut delayed_defs + &mut delayed_defs, )?; } - while !delayed_defs.is_empty(){ - /* + while !delayed_defs.is_empty() { + /* self.export_class( asm, *class_def, &mut method_decls, @@ -86,14 +82,12 @@ impl Exporter for CExporter { .arg(exe_out) .arg("-g") .arg("-Ofast") - // .arg("-FOLD") saves up on space, consider enabling. ; let out = cmd.output().unwrap(); let stdout = String::from_utf8_lossy(&out.stdout); let stderr = String::from_utf8_lossy(&out.stderr); - if stderr.contains("error") || stderr.contains("fatal") - { + if stderr.contains("error") || stderr.contains("fatal") { panic!( "stdout:{} stderr:{} cmd:{cmd:?}", stdout, diff --git a/cilly/src/v2/class.rs b/cilly/src/v2/class.rs index 59c2de4b..740b9314 100644 --- a/cilly/src/v2/class.rs +++ b/cilly/src/v2/class.rs @@ -1,6 +1,5 @@ use std::num::NonZeroU32; -use fxhash::FxHashMap; use serde::{Deserialize, Serialize}; use crate::{v2::MethodDef, DotnetTypeRef as V1ClassRef}; @@ -8,7 +7,6 @@ use crate::{v2::MethodDef, DotnetTypeRef as V1ClassRef}; use super::{ access::Access, bimap::{BiMapIndex, IntoBiMapIndex}, - opt::{OptFuel, SideEffectInfoCache}, Assembly, MethodDefIdx, StringIdx, Type, }; @@ -291,9 +289,10 @@ impl ClassDef { } self.methods_mut().push(ref_idx); } + /* /// Optimizes this class definition, consuming fuel pub fn opt(&mut self, fuel: &mut OptFuel, asm: &mut Assembly, cache: &mut SideEffectInfoCache) { - } + } */ } #[derive(Hash, PartialEq, Eq, Clone, Debug, Copy, Serialize, Deserialize)] pub struct ClassDefIdx(pub ClassRefIdx); diff --git a/cilly/src/v2/float.rs b/cilly/src/v2/float.rs index 6d71e123..26e185aa 100644 --- a/cilly/src/v2/float.rs +++ b/cilly/src/v2/float.rs @@ -7,6 +7,7 @@ pub enum Float { F16, F32, F64, + F128, } impl From for Type { fn from(value: Float) -> Self { diff --git a/cilly/src/v2/il_exporter/mod.rs b/cilly/src/v2/il_exporter/mod.rs index 1cc866d6..06c7cdc7 100644 --- a/cilly/src/v2/il_exporter/mod.rs +++ b/cilly/src/v2/il_exporter/mod.rs @@ -1,9 +1,11 @@ -use std::io::Write; -use lazy_static::*; use crate::v2::MethodImpl; +use lazy_static::*; +use std::io::Write; use super::{ - asm::{IlasmFlavour, ILASM_FLAVOUR, ILASM_PATH}, cilroot::BranchCond, int, Assembly, CILIter, CILIterElem, CILNode, ClassRefIdx, Exporter, NodeIdx, RootIdx, Type + asm::{IlasmFlavour, ILASM_FLAVOUR, ILASM_PATH}, + cilroot::BranchCond, + int, Assembly, CILIter, CILIterElem, CILNode, ClassRefIdx, Exporter, NodeIdx, RootIdx, Type, }; pub struct ILExporter { @@ -59,12 +61,18 @@ impl ILExporter { writeln!(out, ".field {tpe} '{name}'") }?; } - crate::utilis::assert_unique(class_def.static_fields(), format!("The class {} contains a duplicate static field",asm.get_string(class_def.name()))); + crate::utilis::assert_unique( + class_def.static_fields(), + format!( + "The class {} contains a duplicate static field", + asm.get_string(class_def.name()) + ), + ); // Export all static fields for (tpe, name, thread_local) in class_def.static_fields() { let name = asm.get_string(*name); let tpe = non_void_type_il(tpe, asm); - + writeln!(out, ".field static {tpe} '{name}'")?; if *thread_local { writeln!(out,".custom instance void [System.Runtime]System.ThreadStaticAttribute::.ctor() = (01 00 00 00)")?; @@ -82,9 +90,7 @@ impl ILExporter { crate::v2::cilnode::MethodKind::Static => "static", crate::v2::cilnode::MethodKind::Instance => "instance", crate::v2::cilnode::MethodKind::Virtual => "virtual instance", - crate::v2::cilnode::MethodKind::Constructor => { - "rtspecialname specialname" - } + crate::v2::cilnode::MethodKind::Constructor => "rtspecialname specialname", }; let pinvoke = if let MethodImpl::Extern { lib, @@ -122,9 +128,11 @@ impl ILExporter { }) .intersperse(",".to_string()) .collect(); - let preservesig = if method.implementation().is_extern(){ + let preservesig = if method.implementation().is_extern() { "preservesig" - }else{""}; + } else { + "" + }; writeln!( out, ".method {vis} hidebysig {kind} {pinvoke} {ret} '{name}'({inputs}) cil managed {preservesig}{{// Method ID {method_id:?}" @@ -192,7 +200,7 @@ impl ILExporter { for root in hblock.roots(){ self.export_root(asm,out,*root,true)?; } - } + } } if block.handler().is_some(){ writeln!(out,"}}")?; @@ -207,6 +215,7 @@ impl ILExporter { }; Ok(()) } + #[allow(clippy::only_used_in_recursion)] // Futrue proffing. The IL exporter will need this in the future. fn export_node( &self, asm: &super::Assembly, @@ -473,6 +482,8 @@ impl ILExporter { (super::Float::F32, false) => writeln!(out, "conv.r.un conv.r4"), (super::Float::F64, true) => writeln!(out, "conv.r8"), (super::Float::F64, false) => writeln!(out, "conv.r.un conv.r8"), + (super::Float::F128, true) => todo!(), + (super::Float::F128, false) => todo!(), } } super::CILNode::RefToPtr(inner) => { @@ -561,6 +572,10 @@ impl ILExporter { (super::Float::F32, false) => writeln!(out, "ldind.r4"), (super::Float::F64, true) => writeln!(out, "volatile. ldind.r8"), (super::Float::F64, false) => writeln!(out, "ldind.r8"), + (super::Float::F128, true) => { + writeln!(out, "volatile. ldobj {}", type_il(tpe, asm)) + } + (super::Float::F128, false) => writeln!(out, "ldobj {}", type_il(tpe, asm)), }, (Type::PlatformString | Type::PlatformObject, true) => { writeln!(out, "volatile. ldind.ref") @@ -729,8 +744,7 @@ impl ILExporter { writeln!(out, "beq bb{}", branch.0) } else if is_handler { writeln!(out, "beq h{}_{}", branch.0, branch.1) - } - else { + } else { writeln!(out, "beq jp{}_{}", branch.0, branch.1) } } @@ -741,55 +755,57 @@ impl ILExporter { writeln!(out, "bne.un bb{}", branch.0) } else if is_handler { writeln!(out, "bne.un h{}_{}", branch.0, branch.1) - } - else { + } else { writeln!(out, "bne.un jp{}_{}", branch.0, branch.1) } } Some(BranchCond::Lt(a, b, kind)) => { self.export_node(asm, out, *a)?; self.export_node(asm, out, *b)?; - match kind{ - super::cilroot::CmpKind::Ordered | super::cilroot::CmpKind::Signed => if branch.1 == 0 { - writeln!(out, "blt bb{}", branch.0) - } else if is_handler { - writeln!(out, "blt h{}_{}", branch.0, branch.1) - } - else { - writeln!(out, "blt jp{}_{}", branch.0, branch.1) - } - super::cilroot::CmpKind::Unordered | super::cilroot::CmpKind::Unsigned => if branch.1 == 0 { - writeln!(out, "blt.un bb{}", branch.0) - } else if is_handler { - writeln!(out, "blt.un h{}_{}", branch.0, branch.1) + match kind { + super::cilroot::CmpKind::Ordered | super::cilroot::CmpKind::Signed => { + if branch.1 == 0 { + writeln!(out, "blt bb{}", branch.0) + } else if is_handler { + writeln!(out, "blt h{}_{}", branch.0, branch.1) + } else { + writeln!(out, "blt jp{}_{}", branch.0, branch.1) + } } - else { - writeln!(out, "blt.un jp{}_{}", branch.0, branch.1) + super::cilroot::CmpKind::Unordered | super::cilroot::CmpKind::Unsigned => { + if branch.1 == 0 { + writeln!(out, "blt.un bb{}", branch.0) + } else if is_handler { + writeln!(out, "blt.un h{}_{}", branch.0, branch.1) + } else { + writeln!(out, "blt.un jp{}_{}", branch.0, branch.1) + } } } } Some(BranchCond::Gt(a, b, kind)) => { self.export_node(asm, out, *a)?; self.export_node(asm, out, *b)?; - match kind{ - super::cilroot::CmpKind::Ordered | super::cilroot::CmpKind::Signed => if branch.1 == 0 { - writeln!(out, "bgt bb{}", branch.0) - } else if is_handler { - writeln!(out, "bgt h{}_{}", branch.0, branch.1) - } - else { - writeln!(out, "bgt jp{}_{}", branch.0, branch.1) - } - super::cilroot::CmpKind::Unordered | super::cilroot::CmpKind::Unsigned => if branch.1 == 0 { - writeln!(out, "bgt.un bb{}", branch.0) - } else if is_handler { - writeln!(out, "bgt.un h{}_{}", branch.0, branch.1) + match kind { + super::cilroot::CmpKind::Ordered | super::cilroot::CmpKind::Signed => { + if branch.1 == 0 { + writeln!(out, "bgt bb{}", branch.0) + } else if is_handler { + writeln!(out, "bgt h{}_{}", branch.0, branch.1) + } else { + writeln!(out, "bgt jp{}_{}", branch.0, branch.1) + } } - else { - writeln!(out, "bgt.un jp{}_{}", branch.0, branch.1) + super::cilroot::CmpKind::Unordered | super::cilroot::CmpKind::Unsigned => { + if branch.1 == 0 { + writeln!(out, "bgt.un bb{}", branch.0) + } else if is_handler { + writeln!(out, "bgt.un h{}_{}", branch.0, branch.1) + } else { + writeln!(out, "bgt.un jp{}_{}", branch.0, branch.1) + } } } - } Some(BranchCond::True(cond)) => { self.export_node(asm, out, *cond)?; @@ -797,8 +813,7 @@ impl ILExporter { writeln!(out, "brtrue bb{}", branch.0) } else if is_handler { writeln!(out, "brtrue h{}_{}", branch.0, branch.1) - } - else { + } else { writeln!(out, "brtrue jp{}_{}", branch.0, branch.1) } } @@ -881,12 +896,16 @@ impl ILExporter { .collect(); let name = asm.get_string(mref.name()); let class = class_ref(mref.class(), asm); - writeln!(out, "{call_op} {output} {class}::'{name}'({inputs}) //mref:{:?}",call.0) + writeln!( + out, + "{call_op} {output} {class}::'{name}'({inputs}) //mref:{:?}", + call.0 + ) } super::CILRoot::StInd(stind) => { self.export_node(asm, out, stind.0)?; self.export_node(asm, out, stind.1)?; - + let tpe = stind.2; let is_volitale = if stind.3 { "volatile." } else { "" }; match tpe { @@ -926,6 +945,7 @@ impl ILExporter { super::Float::F16 => todo!(), super::Float::F32 => writeln!(out, "{is_volitale} stind.r4"), super::Float::F64 => writeln!(out, "{is_volitale} stind.r8"), + super::Float::F128 => writeln!(out, "stobj {}", type_il(&tpe, asm)), }, Type::PlatformString | Type::PlatformObject => { writeln!(out, "{is_volitale} stind.ref") @@ -994,7 +1014,7 @@ impl Exporter for ILExporter { fn export(&self, asm: &super::Assembly, target: &std::path::Path) -> Result<(), Self::Error> { // The IL file should be next to the target let il_path = target.with_extension("il"); - + if let Err(err) = std::fs::remove_file(&il_path) { match err.kind() { std::io::ErrorKind::NotFound => (), @@ -1027,9 +1047,9 @@ impl Exporter for ILExporter { .arg(asm_type) // .arg("-FOLD") saves up on space, consider enabling. ; - if *ILASM_FLAVOUR == IlasmFlavour::Clasic{ + if *ILASM_FLAVOUR == IlasmFlavour::Clasic { // Limit the memory usage of mono - cmd.env("MONO_GC_PARAMS","soft-heap-limit=500m"); + cmd.env("MONO_GC_PARAMS", "soft-heap-limit=500m"); } let out = cmd.output().unwrap(); let stdout = String::from_utf8_lossy(&out.stdout); @@ -1118,6 +1138,8 @@ fn type_il(tpe: &Type, asm: &Assembly) -> String { super::Float::F16 => "valuetype [System.Runtime]System.Half".into(), super::Float::F32 => "float32".into(), super::Float::F64 => "float64".into(), + + super::Float::F128 => "valuetype f128".into(), }, Type::PlatformChar => "char".into(), Type::PlatformGeneric(arg, generic) => match generic { @@ -1267,4 +1289,4 @@ lazy_static! { }}" ) }; -} \ No newline at end of file +} diff --git a/cilly/src/v2/java_exporter/mod.rs b/cilly/src/v2/java_exporter/mod.rs index d3b3df43..63557415 100644 --- a/cilly/src/v2/java_exporter/mod.rs +++ b/cilly/src/v2/java_exporter/mod.rs @@ -266,6 +266,7 @@ fn type_il(tpe: &Type, asm: &Assembly) -> String { super::Float::F16 => todo!(), super::Float::F32 => "float32".into(), super::Float::F64 => "float64".into(), + super::Float::F128 => todo!(), }, Type::PlatformChar => "char".into(), Type::PlatformGeneric(arg, generic) => match generic { diff --git a/cilly/src/v2/opt/mod.rs b/cilly/src/v2/opt/mod.rs index 7e946061..e5cfe117 100644 --- a/cilly/src/v2/opt/mod.rs +++ b/cilly/src/v2/opt/mod.rs @@ -1,11 +1,14 @@ use std::collections::HashMap; -use crate::v2::{ - asm::ILASM_FLAVOUR, cilnode::MethodKind, il_exporter::ILExporter, Assembly, MethodDef, -}; +use crate::v2::{Assembly, MethodDef}; #[derive(Clone, Eq, PartialEq, Debug)] pub struct OptFuel(u32); impl OptFuel { + pub fn scale(self, scale: f32) -> Self { + let inner = self.0; + let scale_div = (1.0 / scale) as u32; + Self(inner / scale_div) + } /// Creates *fuel* fuel pub fn new(fuel: u32) -> Self { Self(fuel) @@ -25,8 +28,8 @@ impl OptFuel { } } use super::{ - method::LocalDef, BasicBlock, BinOp, CILIter, CILIterElem, CILNode, CILRoot, Float, Int, - MethodImpl, NodeIdx, Type, + method::LocalDef, BasicBlock, CILIter, CILIterElem, CILNode, CILRoot, Int, MethodImpl, NodeIdx, + Type, }; impl CILNode { pub fn propagate_locals( @@ -170,6 +173,42 @@ impl CILNode { } } impl BasicBlock { + /// Removes duplicate debug info, to reduce the size of the final assembly. + pub fn remove_duplicate_sfi(&mut self, asm: &mut Assembly) { + let mut prev_ls = u32::MAX; + let mut prev_ll = u16::MAX; + let mut prev_cs = u16::MAX; + let mut prev_cl = u16::MAX; + let mut prev_file = asm.alloc_string("InvalidDebugInfoString"); + let nop = asm.alloc_root(CILRoot::Nop); + for root in self.roots_mut().iter_mut() { + if let CILRoot::SourceFileInfo { + line_start, + line_len, + col_start, + col_len, + file, + } = asm.get_root(*root) + { + // Check if this sfi is a duplciate. If so, replace it with a NOP; We ignore columns cos they are not all that important in most cases. + if *file == prev_file + //&& *col_len == prev_cl + //&& *col_start == prev_cs + && *line_len == prev_ll + && *line_start == prev_ls + { + *root = nop; + } + // Set the prev sfi to curr sfi + prev_file = *file; + prev_cl = *col_len; + prev_cs = *col_start; + prev_ll = *line_len; + prev_ls = *line_start; + } + } + self.roots_mut().retain(|root| *root != nop); + } /// Optimizes the [`BasicBlock`] by attempting to propagate the value of local assigments. This, in turn, allows for certain assigements to be removed in the future, and reduces the local varaible count. /// Having less locals allows the JIT to optimize this function more, and, in the case of valuetypes, shrinks down the stack usage. pub fn local_opt( @@ -217,7 +256,7 @@ impl BasicBlock { let new_node: CILNode = asm.get_node(*node).clone(); let new_node = new_node.propagate_locals( asm, - loc as u32, + loc, *asm.get_type(locals[loc as usize].1), tree, fuel, @@ -234,6 +273,15 @@ impl BasicBlock { } } impl MethodImpl { + pub fn remove_duplicate_sfi(&mut self, asm: &mut Assembly) { + // Optimization only suported for methods with locals + let MethodImpl::MethodBody { blocks, .. } = self else { + return; + }; + blocks + .iter_mut() + .for_each(|block| block.remove_duplicate_sfi(asm)); + } /// Propagates writes to local variables. pub fn propagate_locals( &mut self, @@ -359,12 +407,17 @@ impl MethodDef { self.implementation_mut().propagate_locals(asm, cache, fuel); self.implementation_mut() .remove_dead_writes(asm, cache, fuel); + if fuel.consume(5) { + self.implementation_mut().remove_duplicate_sfi(asm); + } } } #[test] fn opt_mag() { + use super::{BinOp, Float}; + use crate::v2::{asm::ILASM_FLAVOUR, cilnode::MethodKind, il_exporter::ILExporter}; let mut asm = Assembly::default(); - let mut cache = SideEffectInfoCache::default(); + // Arg gets let ldarg_0 = asm.alloc_node(CILNode::LdArg(0)); let ldarg_1 = asm.alloc_node(CILNode::LdArg(1)); @@ -381,7 +434,7 @@ fn opt_mag() { let stloc_2 = asm.alloc_root(CILRoot::StLoc(2, mag)); let ret = asm.alloc_root(CILRoot::Ret(ldloc_2)); - let mut bb = BasicBlock::new(vec![stloc_0, stloc_1, stloc_2, ret], 0, None); + let bb = BasicBlock::new(vec![stloc_0, stloc_1, stloc_2, ret], 0, None); // Locals let locals = vec![ (None, asm.alloc_type(Float::F32)), @@ -389,7 +442,7 @@ fn opt_mag() { (None, asm.alloc_type(Float::F32)), ]; - let mut mimpl = MethodImpl::MethodBody { + let mimpl = MethodImpl::MethodBody { blocks: vec![bb], locals, }; diff --git a/cilly/src/v2/tpe.rs b/cilly/src/v2/tpe.rs index 8c0c15d9..c7c96d40 100644 --- a/cilly/src/v2/tpe.rs +++ b/cilly/src/v2/tpe.rs @@ -80,6 +80,7 @@ impl Type { crate::Type::F16 => Float::F16.into(), crate::Type::F32 => Float::F32.into(), crate::Type::F64 => Float::F64.into(), + crate::Type::F128 => Float::F128.into(), crate::Type::U8 => Int::U8.into(), crate::Type::U16 => Int::U16.into(), crate::Type::U32 => Int::U32.into(), diff --git a/native_benchmark.txt b/native_benchmark.txt index 92be57ef..2bb63791 100644 --- a/native_benchmark.txt +++ b/native_benchmark.txt @@ -1,479 +1,477 @@ running 476 tests -test any::bench_downcast_ref ... bench: 1.01 ns/iter (+/- 0.04) -test array::map_256byte_8byte_256 ... bench: 3,343.47 ns/iter (+/- 9.77) -test array::map_8byte_256byte_256 ... bench: 6,057.53 ns/iter (+/- 535.81) -test array::map_8byte_8byte_256 ... bench: 2,335.70 ns/iter (+/- 15.40) -test array::map_8byte_8byte_64 ... bench: 344.79 ns/iter (+/- 26.19) -test array::map_8byte_8byte_8 ... bench: 51.91 ns/iter (+/- 0.58) -test ascii::bench_ascii_escape_display_mixed ... bench: 3,941.46 ns/iter (+/- 54.07) -test ascii::bench_ascii_escape_display_no_escape ... bench: 96.67 ns/iter (+/- 3.81) -test ascii::is_ascii::long::case00_libcore ... bench: 11.70 ns/iter (+/- 0.25) = 635454 MB/s -test ascii::is_ascii::long::case01_iter_all ... bench: 131.50 ns/iter (+/- 37.46) = 53358 MB/s -test ascii::is_ascii::long::case02_align_to ... bench: 11.91 ns/iter (+/- 0.68) = 635454 MB/s -test ascii::is_ascii::long::case03_align_to_unrolled ... bench: 6.28 ns/iter (+/- 0.08) = 1165000 MB/s -test ascii::is_ascii::medium::case00_libcore ... bench: 1.23 ns/iter (+/- 0.08) = 32000 MB/s -test ascii::is_ascii::medium::case01_iter_all ... bench: 15.16 ns/iter (+/- 5.20) = 2133 MB/s -test ascii::is_ascii::medium::case02_align_to ... bench: 2.09 ns/iter (+/- 0.72) = 16000 MB/s -test ascii::is_ascii::medium::case03_align_to_unrolled ... bench: 1.77 ns/iter (+/- 0.04) = 32000 MB/s -test ascii::is_ascii::short::case00_libcore ... bench: 2.01 ns/iter (+/- 0.01) = 3500 MB/s -test ascii::is_ascii::short::case01_iter_all ... bench: 2.67 ns/iter (+/- 0.54) = 3500 MB/s -test ascii::is_ascii::short::case02_align_to ... bench: 1.92 ns/iter (+/- 0.03) = 7000 MB/s -test ascii::is_ascii::short::case03_align_to_unrolled ... bench: 1.91 ns/iter (+/- 0.02) = 7000 MB/s -test ascii::is_ascii::unaligned_both::case00_libcore ... bench: 0.89 ns/iter (+/- 0.00) = 30000 MB/s -test ascii::is_ascii::unaligned_both::case01_iter_all ... bench: 3.84 ns/iter (+/- 0.05) = 10000 MB/s -test ascii::is_ascii::unaligned_both::case02_align_to ... bench: 4.72 ns/iter (+/- 0.20) = 7500 MB/s -test ascii::is_ascii::unaligned_both::case03_align_to_unrolled ... bench: 4.11 ns/iter (+/- 0.20) = 7500 MB/s -test ascii::is_ascii::unaligned_head::case00_libcore ... bench: 1.24 ns/iter (+/- 0.02) = 31000 MB/s -test ascii::is_ascii::unaligned_head::case01_iter_all ... bench: 7.93 ns/iter (+/- 0.17) = 4428 MB/s -test ascii::is_ascii::unaligned_head::case02_align_to ... bench: 3.70 ns/iter (+/- 0.17) = 10333 MB/s -test ascii::is_ascii::unaligned_head::case03_align_to_unrolled ... bench: 5.03 ns/iter (+/- 0.56) = 6200 MB/s -test ascii::is_ascii::unaligned_tail::case00_libcore ... bench: 0.90 ns/iter (+/- 0.04) = 31000 MB/s -test ascii::is_ascii::unaligned_tail::case01_iter_all ... bench: 3.87 ns/iter (+/- 0.37) = 10333 MB/s -test ascii::is_ascii::unaligned_tail::case02_align_to ... bench: 2.46 ns/iter (+/- 0.00) = 15500 MB/s -test ascii::is_ascii::unaligned_tail::case03_align_to_unrolled ... bench: 4.35 ns/iter (+/- 0.69) = 7750 MB/s -test ascii::long::case00_alloc_only ... bench: 73.25 ns/iter (+/- 0.84) = 95753 MB/s -test ascii::long::case01_black_box_read_each_byte ... bench: 1,237.81 ns/iter (+/- 34.13) = 5650 MB/s -test ascii::long::case02_lookup_table ... bench: 1,154.68 ns/iter (+/- 2.27) = 6057 MB/s -test ascii::long::case03_branch_and_subtract ... bench: 240.43 ns/iter (+/- 6.09) = 29125 MB/s -test ascii::long::case04_branch_and_mask ... bench: 303.30 ns/iter (+/- 1.52) = 23069 MB/s -test ascii::long::case05_branchless ... bench: 271.96 ns/iter (+/- 1.54) = 25793 MB/s -test ascii::long::case06_libcore ... bench: 240.14 ns/iter (+/- 1.26) = 29125 MB/s -test ascii::long::case07_fake_simd_u32 ... bench: 271.46 ns/iter (+/- 1.36) = 25793 MB/s -test ascii::long::case08_fake_simd_u64 ... bench: 272.32 ns/iter (+/- 1.45) = 25698 MB/s -test ascii::long::case09_mask_mult_bool_branchy_lookup_table ... bench: 3,614.46 ns/iter (+/- 140.13) = 1934 MB/s -test ascii::long::case10_mask_mult_bool_lookup_table ... bench: 2,682.98 ns/iter (+/- 10.15) = 2606 MB/s -test ascii::long::case11_mask_mult_bool_match_range ... bench: 238.12 ns/iter (+/- 4.27) = 29369 MB/s -test ascii::long::case12_mask_shifted_bool_match_range ... bench: 238.32 ns/iter (+/- 4.15) = 29369 MB/s -test ascii::long::case13_subtract_shifted_bool_match_range ... bench: 241.44 ns/iter (+/- 13.07) = 29004 MB/s -test ascii::long::case14_subtract_multiplied_bool_match_range ... bench: 242.11 ns/iter (+/- 8.37) = 28884 MB/s -test ascii::long::is_ascii ... bench: 142.34 ns/iter (+/- 1.35) = 49225 MB/s -test ascii::long::is_ascii_alphabetic ... bench: 73.64 ns/iter (+/- 0.94) = 95753 MB/s -test ascii::long::is_ascii_alphanumeric ... bench: 73.61 ns/iter (+/- 1.01) = 95753 MB/s -test ascii::long::is_ascii_control ... bench: 73.87 ns/iter (+/- 0.87) = 95753 MB/s -test ascii::long::is_ascii_digit ... bench: 67.73 ns/iter (+/- 0.87) = 104328 MB/s -test ascii::long::is_ascii_graphic ... bench: 68.13 ns/iter (+/- 1.04) = 102794 MB/s -test ascii::long::is_ascii_hexdigit ... bench: 68.03 ns/iter (+/- 1.13) = 102794 MB/s -test ascii::long::is_ascii_lowercase ... bench: 65.74 ns/iter (+/- 0.90) = 107538 MB/s -test ascii::long::is_ascii_punctuation ... bench: 67.65 ns/iter (+/- 0.47) = 104328 MB/s -test ascii::long::is_ascii_uppercase ... bench: 68.42 ns/iter (+/- 1.05) = 102794 MB/s -test ascii::long::is_ascii_whitespace ... bench: 67.73 ns/iter (+/- 0.78) = 104328 MB/s -test ascii::medium::case00_alloc_only ... bench: 6.25 ns/iter (+/- 0.16) = 5333 MB/s -test ascii::medium::case01_black_box_read_each_byte ... bench: 13.55 ns/iter (+/- 0.58) = 2461 MB/s -test ascii::medium::case02_lookup_table ... bench: 14.31 ns/iter (+/- 0.27) = 2285 MB/s -test ascii::medium::case03_branch_and_subtract ... bench: 6.68 ns/iter (+/- 0.18) = 5333 MB/s -test ascii::medium::case04_branch_and_mask ... bench: 6.80 ns/iter (+/- 0.13) = 5333 MB/s -test ascii::medium::case05_branchless ... bench: 6.75 ns/iter (+/- 0.26) = 5333 MB/s -test ascii::medium::case06_libcore ... bench: 6.65 ns/iter (+/- 0.13) = 5333 MB/s -test ascii::medium::case07_fake_simd_u32 ... bench: 7.80 ns/iter (+/- 0.21) = 4571 MB/s -test ascii::medium::case08_fake_simd_u64 ... bench: 7.88 ns/iter (+/- 0.07) = 4571 MB/s -test ascii::medium::case09_mask_mult_bool_branchy_lookup_table ... bench: 22.91 ns/iter (+/- 0.30) = 1454 MB/s -test ascii::medium::case10_mask_mult_bool_lookup_table ... bench: 20.52 ns/iter (+/- 0.48) = 1600 MB/s -test ascii::medium::case11_mask_mult_bool_match_range ... bench: 6.70 ns/iter (+/- 0.19) = 5333 MB/s -test ascii::medium::case12_mask_shifted_bool_match_range ... bench: 6.62 ns/iter (+/- 0.15) = 5333 MB/s -test ascii::medium::case13_subtract_shifted_bool_match_range ... bench: 6.56 ns/iter (+/- 0.08) = 5333 MB/s -test ascii::medium::case14_subtract_multiplied_bool_match_range ... bench: 6.56 ns/iter (+/- 0.12) = 5333 MB/s -test ascii::medium::is_ascii ... bench: 6.32 ns/iter (+/- 0.19) = 5333 MB/s -test ascii::medium::is_ascii_alphabetic ... bench: 7.70 ns/iter (+/- 0.09) = 4571 MB/s -test ascii::medium::is_ascii_alphanumeric ... bench: 8.23 ns/iter (+/- 0.18) = 4000 MB/s -test ascii::medium::is_ascii_control ... bench: 6.70 ns/iter (+/- 0.34) = 5333 MB/s -test ascii::medium::is_ascii_digit ... bench: 6.54 ns/iter (+/- 0.16) = 5333 MB/s -test ascii::medium::is_ascii_graphic ... bench: 7.81 ns/iter (+/- 0.32) = 4571 MB/s -test ascii::medium::is_ascii_hexdigit ... bench: 6.81 ns/iter (+/- 0.47) = 5333 MB/s -test ascii::medium::is_ascii_lowercase ... bench: 6.68 ns/iter (+/- 0.50) = 5333 MB/s -test ascii::medium::is_ascii_punctuation ... bench: 7.42 ns/iter (+/- 0.15) = 4571 MB/s -test ascii::medium::is_ascii_uppercase ... bench: 6.49 ns/iter (+/- 0.19) = 5333 MB/s -test ascii::medium::is_ascii_whitespace ... bench: 6.48 ns/iter (+/- 0.10) = 5333 MB/s -test ascii::short::case00_alloc_only ... bench: 6.41 ns/iter (+/- 0.24) = 1166 MB/s -test ascii::short::case01_black_box_read_each_byte ... bench: 6.74 ns/iter (+/- 0.47) = 1166 MB/s -test ascii::short::case02_lookup_table ... bench: 6.64 ns/iter (+/- 0.26) = 1166 MB/s -test ascii::short::case03_branch_and_subtract ... bench: 6.66 ns/iter (+/- 0.22) = 1166 MB/s -test ascii::short::case04_branch_and_mask ... bench: 6.62 ns/iter (+/- 0.29) = 1166 MB/s -test ascii::short::case05_branchless ... bench: 6.66 ns/iter (+/- 0.26) = 1166 MB/s -test ascii::short::case06_libcore ... bench: 6.59 ns/iter (+/- 0.15) = 1166 MB/s -test ascii::short::case07_fake_simd_u32 ... bench: 7.82 ns/iter (+/- 0.02) = 1000 MB/s -test ascii::short::case08_fake_simd_u64 ... bench: 8.59 ns/iter (+/- 0.20) = 875 MB/s -test ascii::short::case09_mask_mult_bool_branchy_lookup_table ... bench: 6.37 ns/iter (+/- 0.21) = 1166 MB/s -test ascii::short::case10_mask_mult_bool_lookup_table ... bench: 6.50 ns/iter (+/- 0.19) = 1166 MB/s -test ascii::short::case11_mask_mult_bool_match_range ... bench: 6.71 ns/iter (+/- 0.19) = 1166 MB/s -test ascii::short::case12_mask_shifted_bool_match_range ... bench: 6.68 ns/iter (+/- 0.33) = 1166 MB/s -test ascii::short::case13_subtract_shifted_bool_match_range ... bench: 6.67 ns/iter (+/- 0.21) = 1166 MB/s -test ascii::short::case14_subtract_multiplied_bool_match_range ... bench: 6.66 ns/iter (+/- 0.25) = 1166 MB/s -test ascii::short::is_ascii ... bench: 6.42 ns/iter (+/- 0.21) = 1166 MB/s -test ascii::short::is_ascii_alphabetic ... bench: 6.43 ns/iter (+/- 0.24) = 1166 MB/s -test ascii::short::is_ascii_alphanumeric ... bench: 6.42 ns/iter (+/- 0.13) = 1166 MB/s -test ascii::short::is_ascii_control ... bench: 6.44 ns/iter (+/- 0.50) = 1166 MB/s -test ascii::short::is_ascii_digit ... bench: 6.51 ns/iter (+/- 0.24) = 1166 MB/s -test ascii::short::is_ascii_graphic ... bench: 6.38 ns/iter (+/- 0.09) = 1166 MB/s -test ascii::short::is_ascii_hexdigit ... bench: 6.45 ns/iter (+/- 0.24) = 1166 MB/s -test ascii::short::is_ascii_lowercase ... bench: 6.43 ns/iter (+/- 0.34) = 1166 MB/s -test ascii::short::is_ascii_punctuation ... bench: 7.97 ns/iter (+/- 0.52) = 1000 MB/s -test ascii::short::is_ascii_uppercase ... bench: 6.40 ns/iter (+/- 0.32) = 1166 MB/s -test ascii::short::is_ascii_whitespace ... bench: 6.36 ns/iter (+/- 0.30) = 1166 MB/s -test char::methods::bench_ascii_char_to_lowercase ... bench: 11,250.91 ns/iter (+/- 104.95) -test char::methods::bench_ascii_char_to_uppercase ... bench: 11,255.29 ns/iter (+/- 109.46) -test char::methods::bench_ascii_mix_to_lowercase ... bench: 32,392.68 ns/iter (+/- 479.39) -test char::methods::bench_ascii_mix_to_uppercase ... bench: 32,741.19 ns/iter (+/- 966.46) -test char::methods::bench_non_ascii_char_to_lowercase ... bench: 53,997.85 ns/iter (+/- 637.79) -test char::methods::bench_non_ascii_char_to_uppercase ... bench: 54,881.88 ns/iter (+/- 652.07) -test char::methods::bench_to_ascii_lowercase ... bench: 5,260.69 ns/iter (+/- 64.27) -test char::methods::bench_to_ascii_uppercase ... bench: 5,267.94 ns/iter (+/- 55.28) -test char::methods::bench_to_digit_radix_10 ... bench: 3,520.62 ns/iter (+/- 49.29) -test char::methods::bench_to_digit_radix_16 ... bench: 10,322.14 ns/iter (+/- 642.21) -test char::methods::bench_to_digit_radix_2 ... bench: 3,605.19 ns/iter (+/- 305.13) -test char::methods::bench_to_digit_radix_36 ... bench: 14,310.58 ns/iter (+/- 310.98) -test char::methods::bench_to_digit_radix_var ... bench: 17,559.88 ns/iter (+/- 237.03) -test fmt::write_str_macro1 ... bench: 7,676.47 ns/iter (+/- 81.93) -test fmt::write_str_macro2 ... bench: 7,881.70 ns/iter (+/- 215.56) -test fmt::write_str_macro_debug ... bench: 122,390.57 ns/iter (+/- 1,330.63) -test fmt::write_str_macro_debug_ascii ... bench: 15,486.41 ns/iter (+/- 250.21) -test fmt::write_str_ref ... bench: 1,774.39 ns/iter (+/- 23.38) -test fmt::write_str_value ... bench: 1,775.43 ns/iter (+/- 25.83) -test fmt::write_u128_max ... bench: 34.16 ns/iter (+/- 0.56) -test fmt::write_u128_min ... bench: 6.42 ns/iter (+/- 0.59) -test fmt::write_u64_max ... bench: 23.22 ns/iter (+/- 0.58) -test fmt::write_u64_min ... bench: 6.39 ns/iter (+/- 0.11) -test fmt::write_vec_macro1 ... bench: 9,135.09 ns/iter (+/- 150.35) -test fmt::write_vec_macro2 ... bench: 9,130.60 ns/iter (+/- 409.74) -test fmt::write_vec_macro_debug ... bench: 127,776.84 ns/iter (+/- 1,591.78) -test fmt::write_vec_ref ... bench: 1,774.85 ns/iter (+/- 19.51) -test fmt::write_vec_value ... bench: 1,772.74 ns/iter (+/- 18.26) -test hash::sip::bench_bytes_4 ... bench: 6.42 ns/iter (+/- 0.15) = 666 MB/s -test hash::sip::bench_bytes_7 ... bench: 7.23 ns/iter (+/- 0.15) = 1000 MB/s -test hash::sip::bench_bytes_8 ... bench: 8.40 ns/iter (+/- 0.26) = 1000 MB/s -test hash::sip::bench_bytes_a_16 ... bench: 10.66 ns/iter (+/- 0.27) = 1600 MB/s -test hash::sip::bench_bytes_b_32 ... bench: 15.17 ns/iter (+/- 0.20) = 2133 MB/s -test hash::sip::bench_bytes_c_128 ... bench: 43.18 ns/iter (+/- 0.62) = 2976 MB/s -test hash::sip::bench_long_str ... bench: 135.89 ns/iter (+/- 0.78) -test hash::sip::bench_str_of_8_bytes ... bench: 9.20 ns/iter (+/- 0.18) -test hash::sip::bench_str_over_8_bytes ... bench: 9.73 ns/iter (+/- 0.24) -test hash::sip::bench_str_under_8_bytes ... bench: 8.52 ns/iter (+/- 0.24) -test hash::sip::bench_u32 ... bench: 6.68 ns/iter (+/- 0.09) = 1333 MB/s -test hash::sip::bench_u32_keyed ... bench: 7.05 ns/iter (+/- 0.08) = 1142 MB/s -test hash::sip::bench_u64 ... bench: 8.49 ns/iter (+/- 0.21) = 1000 MB/s -test iter::bench_chain_partial_cmp ... bench: 67,387.67 ns/iter (+/- 492.97) -test iter::bench_cycle_skip_take_ref_sum ... bench: 461,211.60 ns/iter (+/- 6,249.33) -test iter::bench_cycle_skip_take_sum ... bench: 461,590.80 ns/iter (+/- 3,545.32) -test iter::bench_cycle_take_ref_sum ... bench: 486,841.30 ns/iter (+/- 6,221.04) -test iter::bench_cycle_take_skip_ref_sum ... bench: 415,165.30 ns/iter (+/- 8,877.36) -test iter::bench_cycle_take_skip_sum ... bench: 411,572.55 ns/iter (+/- 24,801.99) -test iter::bench_cycle_take_sum ... bench: 486,440.40 ns/iter (+/- 9,667.91) -test iter::bench_enumerate_chain_ref_sum ... bench: 594,117.96 ns/iter (+/- 39,068.70) -test iter::bench_enumerate_chain_sum ... bench: 596,880.25 ns/iter (+/- 17,959.07) -test iter::bench_enumerate_ref_sum ... bench: 265,438.61 ns/iter (+/- 15,566.96) -test iter::bench_enumerate_sum ... bench: 290,819.17 ns/iter (+/- 77,064.26) -test iter::bench_filter_chain_count ... bench: 827,396.10 ns/iter (+/- 129,877.03) -test iter::bench_filter_chain_ref_count ... bench: 649,059.74 ns/iter (+/- 29,396.39) -test iter::bench_filter_chain_ref_sum ... bench: 750,713.70 ns/iter (+/- 8,051.93) -test iter::bench_filter_chain_sum ... bench: 749,663.30 ns/iter (+/- 6,827.46) -test iter::bench_filter_count ... bench: 301,426.00 ns/iter (+/- 2,984.41) -test iter::bench_filter_map_chain_ref_sum ... bench: 602,570.60 ns/iter (+/- 8,918.51) -test iter::bench_filter_map_chain_sum ... bench: 603,115.20 ns/iter (+/- 8,778.92) -test iter::bench_filter_map_ref_sum ... bench: 297,992.55 ns/iter (+/- 408.50) -test iter::bench_filter_map_sum ... bench: 287,777.49 ns/iter (+/- 71,621.74) -test iter::bench_filter_ref_count ... bench: 358,154.27 ns/iter (+/- 65,657.59) -test iter::bench_filter_ref_sum ... bench: 351,198.50 ns/iter (+/- 12,403.10) -test iter::bench_filter_sum ... bench: 360,397.72 ns/iter (+/- 7,474.55) -test iter::bench_flat_map_chain_ref_sum ... bench: 449,787.05 ns/iter (+/- 5,062.85) -test iter::bench_flat_map_chain_sum ... bench: 449,844.65 ns/iter (+/- 4,127.41) -test iter::bench_flat_map_ref_sum ... bench: 227,818.38 ns/iter (+/- 1,766.49) -test iter::bench_flat_map_sum ... bench: 233,324.92 ns/iter (+/- 3,406.19) -test iter::bench_for_each_chain_fold ... bench: 449,048.55 ns/iter (+/- 5,799.41) -test iter::bench_for_each_chain_loop ... bench: 942,376.50 ns/iter (+/- 13,093.65) -test iter::bench_for_each_chain_ref_fold ... bench: 449,363.30 ns/iter (+/- 28,548.40) -test iter::bench_fuse_chain_ref_sum ... bench: 447,071.00 ns/iter (+/- 1,620.25) -test iter::bench_fuse_chain_sum ... bench: 449,411.00 ns/iter (+/- 5,653.34) -test iter::bench_fuse_ref_sum ... bench: 223,964.85 ns/iter (+/- 2,443.06) -test iter::bench_fuse_sum ... bench: 225,022.60 ns/iter (+/- 3,239.40) -test iter::bench_inspect_chain_ref_sum ... bench: 449,244.90 ns/iter (+/- 3,444.01) -test iter::bench_inspect_chain_sum ... bench: 449,436.40 ns/iter (+/- 11,095.08) -test iter::bench_inspect_ref_sum ... bench: 224,568.62 ns/iter (+/- 2,615.01) -test iter::bench_inspect_sum ... bench: 234,710.87 ns/iter (+/- 80,812.70) -test iter::bench_lt ... bench: 30,628.25 ns/iter (+/- 277.88) -test iter::bench_max ... bench: 94.74 ns/iter (+/- 7.87) -test iter::bench_max_by_key ... bench: 98.10 ns/iter (+/- 2.52) -test iter::bench_max_by_key2 ... bench: 852.27 ns/iter (+/- 4.73) -test iter::bench_multiple_take ... bench: 49.61 ns/iter (+/- 0.60) -test iter::bench_next_chunk_copied ... bench: 25.35 ns/iter (+/- 0.04) -test iter::bench_next_chunk_filter_even ... bench: 23.85 ns/iter (+/- 3.25) -test iter::bench_next_chunk_filter_map_even ... bench: 26.08 ns/iter (+/- 0.25) -test iter::bench_next_chunk_filter_map_mostly_false ... bench: 327.08 ns/iter (+/- 5.57) -test iter::bench_next_chunk_filter_map_predictably_true ... bench: 18.33 ns/iter (+/- 0.15) -test iter::bench_next_chunk_filter_mostly_false ... bench: 294.04 ns/iter (+/- 11.84) -test iter::bench_next_chunk_filter_predictably_true ... bench: 12.68 ns/iter (+/- 0.86) -test iter::bench_next_chunk_trusted_random_access ... bench: 25.34 ns/iter (+/- 0.07) -test iter::bench_partial_cmp ... bench: 44,952.75 ns/iter (+/- 273.90) -test iter::bench_peekable_chain_ref_sum ... bench: 449,384.15 ns/iter (+/- 3,828.15) -test iter::bench_peekable_chain_sum ... bench: 449,233.85 ns/iter (+/- 5,329.14) -test iter::bench_peekable_ref_sum ... bench: 224,247.12 ns/iter (+/- 3,622.26) -test iter::bench_peekable_sum ... bench: 223,951.78 ns/iter (+/- 1,404.99) -test iter::bench_range_step_by_fold_u16 ... bench: 46.10 ns/iter (+/- 2.41) -test iter::bench_range_step_by_fold_usize ... bench: 167.23 ns/iter (+/- 4.71) -test iter::bench_range_step_by_loop_u32 ... bench: 88.80 ns/iter (+/- 6.06) -test iter::bench_range_step_by_sum_reducible ... bench: 0.92 ns/iter (+/- 0.02) -test iter::bench_rposition ... bench: 41.27 ns/iter (+/- 0.09) -test iter::bench_skip_chain_ref_sum ... bench: 447,675.45 ns/iter (+/- 6,696.13) -test iter::bench_skip_chain_sum ... bench: 446,867.15 ns/iter (+/- 4,902.17) -test iter::bench_skip_cycle_skip_zip_add_ref_sum ... bench: 1,944,759.30 ns/iter (+/- 32,778.27) -test iter::bench_skip_cycle_skip_zip_add_sum ... bench: 1,943,933.40 ns/iter (+/- 20,667.30) -test iter::bench_skip_ref_sum ... bench: 224,342.75 ns/iter (+/- 1,757.56) -test iter::bench_skip_sum ... bench: 224,276.62 ns/iter (+/- 2,273.46) -test iter::bench_skip_then_zip ... bench: 40.41 ns/iter (+/- 0.89) -test iter::bench_skip_trusted_random_access ... bench: 2,894.43 ns/iter (+/- 16.50) -test iter::bench_skip_while ... bench: 0.22 ns/iter (+/- 0.00) -test iter::bench_skip_while_chain_ref_sum ... bench: 492,553.30 ns/iter (+/- 50,511.49) -test iter::bench_skip_while_chain_sum ... bench: 448,497.53 ns/iter (+/- 3,926.84) -test iter::bench_skip_while_ref_sum ... bench: 226,166.36 ns/iter (+/- 10,376.09) -test iter::bench_skip_while_sum ... bench: 235,149.47 ns/iter (+/- 37,256.88) -test iter::bench_take_while_chain_ref_sum ... bench: 250,953.67 ns/iter (+/- 20,103.52) -test iter::bench_take_while_chain_sum ... bench: 250,281.87 ns/iter (+/- 12,888.23) -test iter::bench_trusted_random_access_adapters ... bench: 23,304.68 ns/iter (+/- 1,384.36) -test iter::bench_zip_add ... bench: 1,800.65 ns/iter (+/- 5.05) -test iter::bench_zip_copy ... bench: 118.44 ns/iter (+/- 0.26) -test iter::bench_zip_then_skip ... bench: 38.76 ns/iter (+/- 2.12) -test net::addr_parser::bench_parse_ipaddr_v4 ... bench: 9.22 ns/iter (+/- 0.15) -test net::addr_parser::bench_parse_ipaddr_v6_compress ... bench: 37.29 ns/iter (+/- 0.82) -test net::addr_parser::bench_parse_ipaddr_v6_full ... bench: 39.27 ns/iter (+/- 1.29) -test net::addr_parser::bench_parse_ipaddr_v6_v4 ... bench: 36.21 ns/iter (+/- 0.72) -test net::addr_parser::bench_parse_ipv4 ... bench: 6.70 ns/iter (+/- 0.12) -test net::addr_parser::bench_parse_ipv6_compress ... bench: 30.78 ns/iter (+/- 1.74) -test net::addr_parser::bench_parse_ipv6_full ... bench: 32.24 ns/iter (+/- 0.66) -test net::addr_parser::bench_parse_ipv6_v4 ... bench: 29.90 ns/iter (+/- 1.41) -test net::addr_parser::bench_parse_socket_v4 ... bench: 10.53 ns/iter (+/- 0.63) -test net::addr_parser::bench_parse_socket_v6 ... bench: 40.22 ns/iter (+/- 1.23) -test net::addr_parser::bench_parse_socket_v6_scope_id ... bench: 43.17 ns/iter (+/- 2.39) -test net::addr_parser::bench_parse_socketaddr_v4 ... bench: 12.59 ns/iter (+/- 0.23) -test net::addr_parser::bench_parse_socketaddr_v6 ... bench: 45.12 ns/iter (+/- 0.93) -test num::bench_i16_from_str ... bench: 23,994.67 ns/iter (+/- 360.51) -test num::bench_i16_from_str_radix_10 ... bench: 22,995.07 ns/iter (+/- 330.38) -test num::bench_i16_from_str_radix_16 ... bench: 25,075.67 ns/iter (+/- 362.56) -test num::bench_i16_from_str_radix_2 ... bench: 16,047.77 ns/iter (+/- 846.07) -test num::bench_i16_from_str_radix_36 ... bench: 25,256.79 ns/iter (+/- 345.75) -test num::bench_i32_from_str ... bench: 23,431.58 ns/iter (+/- 414.78) -test num::bench_i32_from_str_radix_10 ... bench: 21,078.95 ns/iter (+/- 421.54) -test num::bench_i32_from_str_radix_16 ... bench: 24,735.22 ns/iter (+/- 396.24) -test num::bench_i32_from_str_radix_2 ... bench: 15,952.71 ns/iter (+/- 402.99) -test num::bench_i32_from_str_radix_36 ... bench: 28,668.23 ns/iter (+/- 643.59) -test num::bench_i64_from_str ... bench: 29,017.00 ns/iter (+/- 755.26) -test num::bench_i64_from_str_radix_10 ... bench: 20,757.56 ns/iter (+/- 574.77) -test num::bench_i64_from_str_radix_16 ... bench: 23,681.07 ns/iter (+/- 403.99) -test num::bench_i64_from_str_radix_2 ... bench: 13,240.74 ns/iter (+/- 490.05) -test num::bench_i64_from_str_radix_36 ... bench: 28,151.91 ns/iter (+/- 2,338.30) -test num::bench_i8_from_str ... bench: 22,353.95 ns/iter (+/- 383.67) -test num::bench_i8_from_str_radix_10 ... bench: 21,093.71 ns/iter (+/- 285.67) -test num::bench_i8_from_str_radix_16 ... bench: 20,155.22 ns/iter (+/- 756.01) -test num::bench_i8_from_str_radix_2 ... bench: 17,665.84 ns/iter (+/- 547.03) -test num::bench_i8_from_str_radix_36 ... bench: 20,864.11 ns/iter (+/- 765.04) -test num::bench_u16_from_str ... bench: 14,632.36 ns/iter (+/- 128.37) -test num::bench_u16_from_str_radix_10 ... bench: 18,290.47 ns/iter (+/- 310.21) -test num::bench_u16_from_str_radix_16 ... bench: 22,294.81 ns/iter (+/- 563.27) -test num::bench_u16_from_str_radix_2 ... bench: 13,359.47 ns/iter (+/- 511.77) -test num::bench_u16_from_str_radix_36 ... bench: 22,085.33 ns/iter (+/- 809.30) -test num::bench_u32_from_str ... bench: 16,586.52 ns/iter (+/- 241.61) -test num::bench_u32_from_str_radix_10 ... bench: 16,819.84 ns/iter (+/- 260.62) -test num::bench_u32_from_str_radix_16 ... bench: 21,409.57 ns/iter (+/- 3,392.28) -test num::bench_u32_from_str_radix_2 ... bench: 12,091.78 ns/iter (+/- 336.33) -test num::bench_u32_from_str_radix_36 ... bench: 25,126.21 ns/iter (+/- 252.50) -test num::bench_u64_from_str ... bench: 16,206.53 ns/iter (+/- 261.36) -test num::bench_u64_from_str_radix_10 ... bench: 17,883.86 ns/iter (+/- 661.79) -test num::bench_u64_from_str_radix_16 ... bench: 25,992.69 ns/iter (+/- 432.05) -test num::bench_u64_from_str_radix_2 ... bench: 15,416.61 ns/iter (+/- 787.23) -test num::bench_u64_from_str_radix_36 ... bench: 28,167.17 ns/iter (+/- 692.99) -test num::bench_u8_from_str ... bench: 14,682.62 ns/iter (+/- 398.69) -test num::bench_u8_from_str_radix_10 ... bench: 16,021.68 ns/iter (+/- 191.04) -test num::bench_u8_from_str_radix_16 ... bench: 18,716.80 ns/iter (+/- 1,038.31) -test num::bench_u8_from_str_radix_2 ... bench: 12,809.07 ns/iter (+/- 203.18) -test num::bench_u8_from_str_radix_36 ... bench: 17,355.78 ns/iter (+/- 567.33) -test num::dec2flt::bench_0 ... bench: 8.27 ns/iter (+/- 0.03) -test num::dec2flt::bench_1e150 ... bench: 11.68 ns/iter (+/- 0.12) -test num::dec2flt::bench_42 ... bench: 7.37 ns/iter (+/- 0.02) -test num::dec2flt::bench_huge_int ... bench: 34.97 ns/iter (+/- 0.33) -test num::dec2flt::bench_long_decimal_and_exp ... bench: 40.35 ns/iter (+/- 0.42) -test num::dec2flt::bench_max ... bench: 14.26 ns/iter (+/- 0.20) -test num::dec2flt::bench_min_normal ... bench: 14.43 ns/iter (+/- 0.40) -test num::dec2flt::bench_min_subnormal ... bench: 11.26 ns/iter (+/- 0.11) -test num::dec2flt::bench_pi_long ... bench: 36.17 ns/iter (+/- 0.74) -test num::dec2flt::bench_pi_short ... bench: 10.73 ns/iter (+/- 0.08) -test num::dec2flt::bench_short_decimal ... bench: 10.06 ns/iter (+/- 0.13) -test num::flt2dec::bench_big_shortest ... bench: 80.71 ns/iter (+/- 0.56) -test num::flt2dec::bench_small_shortest ... bench: 61.43 ns/iter (+/- 1.25) -test num::flt2dec::strategy::dragon::bench_big_exact_12 ... bench: 1,326.35 ns/iter (+/- 9.90) -test num::flt2dec::strategy::dragon::bench_big_exact_3 ... bench: 624.53 ns/iter (+/- 8.33) -test num::flt2dec::strategy::dragon::bench_big_exact_inf ... bench: 26,840.53 ns/iter (+/- 286.63) -test num::flt2dec::strategy::dragon::bench_big_shortest ... bench: 2,485.99 ns/iter (+/- 27.01) -test num::flt2dec::strategy::dragon::bench_small_exact_12 ... bench: 116.73 ns/iter (+/- 1.10) -test num::flt2dec::strategy::dragon::bench_small_exact_3 ... bench: 55.61 ns/iter (+/- 0.48) -test num::flt2dec::strategy::dragon::bench_small_exact_inf ... bench: 725.13 ns/iter (+/- 3.34) -test num::flt2dec::strategy::dragon::bench_small_shortest ... bench: 120.72 ns/iter (+/- 1.99) -test num::flt2dec::strategy::grisu::bench_big_exact_12 ... bench: 32.59 ns/iter (+/- 0.43) -test num::flt2dec::strategy::grisu::bench_big_exact_3 ... bench: 19.04 ns/iter (+/- 0.72) -test num::flt2dec::strategy::grisu::bench_big_exact_inf ... bench: 26,881.64 ns/iter (+/- 249.80) -test num::flt2dec::strategy::grisu::bench_big_shortest ... bench: 39.52 ns/iter (+/- 0.31) -test num::flt2dec::strategy::grisu::bench_halfway_point_exact_inf ... bench: 365.22 ns/iter (+/- 1.56) -test num::flt2dec::strategy::grisu::bench_one_exact_inf ... bench: 365.16 ns/iter (+/- 3.70) -test num::flt2dec::strategy::grisu::bench_small_exact_12 ... bench: 26.96 ns/iter (+/- 0.67) -test num::flt2dec::strategy::grisu::bench_small_exact_3 ... bench: 17.05 ns/iter (+/- 0.58) -test num::flt2dec::strategy::grisu::bench_small_exact_inf ... bench: 777.63 ns/iter (+/- 25.45) -test num::flt2dec::strategy::grisu::bench_small_shortest ... bench: 25.84 ns/iter (+/- 0.07) -test num::flt2dec::strategy::grisu::bench_trailing_zero_exact_inf ... bench: 377.32 ns/iter (+/- 1.32) -test num::int_log::u128_log10_predictable ... bench: 7,205.88 ns/iter (+/- 66.49) -test num::int_log::u128_log10_random ... bench: 861.20 ns/iter (+/- 13.03) -test num::int_log::u128_log10_random_small ... bench: 701.65 ns/iter (+/- 6.01) -test num::int_log::u128_log_geometric ... bench: 12,766.49 ns/iter (+/- 267.10) -test num::int_log::u128_log_random ... bench: 542,869.20 ns/iter (+/- 10,353.46) -test num::int_log::u128_log_random_small ... bench: 237,046.19 ns/iter (+/- 4,643.82) -test num::int_log::u16_log10_predictable ... bench: 153.91 ns/iter (+/- 3.97) -test num::int_log::u16_log10_random ... bench: 162.65 ns/iter (+/- 6.23) -test num::int_log::u16_log10_random_small ... bench: 163.88 ns/iter (+/- 6.98) -test num::int_log::u16_log_geometric ... bench: 202.36 ns/iter (+/- 5.31) -test num::int_log::u16_log_random ... bench: 121,245.59 ns/iter (+/- 2,375.03) -test num::int_log::u16_log_random_small ... bench: 82,834.59 ns/iter (+/- 1,565.60) -test num::int_log::u32_log10_predictable ... bench: 429.01 ns/iter (+/- 3.66) -test num::int_log::u32_log10_random ... bench: 268.56 ns/iter (+/- 13.07) -test num::int_log::u32_log10_random_small ... bench: 269.72 ns/iter (+/- 14.58) -test num::int_log::u32_log_geometric ... bench: 429.90 ns/iter (+/- 54.13) -test num::int_log::u32_log_random ... bench: 165,812.00 ns/iter (+/- 2,448.67) -test num::int_log::u32_log_random_small ... bench: 64,313.45 ns/iter (+/- 1,854.45) -test num::int_log::u64_log10_predictable ... bench: 1,205.91 ns/iter (+/- 19.28) -test num::int_log::u64_log10_random ... bench: 308.97 ns/iter (+/- 10.31) -test num::int_log::u64_log10_random_small ... bench: 275.14 ns/iter (+/- 6.20) -test num::int_log::u64_log_geometric ... bench: 2,056.94 ns/iter (+/- 59.77) -test num::int_log::u64_log_random ... bench: 262,544.54 ns/iter (+/- 5,288.44) -test num::int_log::u64_log_random_small ... bench: 75,178.03 ns/iter (+/- 1,232.57) -test num::int_log::u8_log10_predictable ... bench: 51.91 ns/iter (+/- 0.69) -test num::int_log::u8_log10_random ... bench: 123.16 ns/iter (+/- 1.52) -test num::int_log::u8_log10_random_small ... bench: 122.89 ns/iter (+/- 1.36) -test num::int_log::u8_log_geometric ... bench: 67.90 ns/iter (+/- 1.42) -test num::int_log::u8_log_random ... bench: 61,887.33 ns/iter (+/- 1,750.48) -test num::int_log::u8_log_random_small ... bench: 62,268.69 ns/iter (+/- 1,470.70) -test num::int_pow::checked_pow_variable ... bench: 1,641.95 ns/iter (+/- 7.34) -test num::int_pow::overflowing_pow_variable ... bench: 1,869.19 ns/iter (+/- 29.67) -test num::int_pow::pow_m7 ... bench: 535.01 ns/iter (+/- 1.81) -test num::int_pow::pow_m8 ... bench: 535.12 ns/iter (+/- 2.26) -test num::int_pow::pow_variable ... bench: 583.53 ns/iter (+/- 10.43) -test num::int_pow::saturating_pow_variable ... bench: 1,664.54 ns/iter (+/- 11.00) -test num::int_pow::wrapping_pow_variable ... bench: 580.01 ns/iter (+/- 6.88) -test ops::alloc_obj_with_dtor ... bench: 0.23 ns/iter (+/- 0.00) -test pattern::ends_with_char ... bench: 352.16 ns/iter (+/- 4.03) -test pattern::ends_with_str ... bench: 352.07 ns/iter (+/- 1.72) -test pattern::starts_with_char ... bench: 359.40 ns/iter (+/- 15.58) -test pattern::starts_with_str ... bench: 357.35 ns/iter (+/- 10.37) -test slice::binary_search_l1 ... bench: 8.52 ns/iter (+/- 0.05) -test slice::binary_search_l1_with_dups ... bench: 8.57 ns/iter (+/- 0.11) -test slice::binary_search_l1_worst_case ... bench: 6.16 ns/iter (+/- 0.10) -test slice::binary_search_l2 ... bench: 14.45 ns/iter (+/- 0.27) -test slice::binary_search_l2_with_dups ... bench: 14.09 ns/iter (+/- 0.07) -test slice::binary_search_l2_worst_case ... bench: 9.53 ns/iter (+/- 0.05) -test slice::binary_search_l3 ... bench: 54.28 ns/iter (+/- 19.42) -test slice::binary_search_l3_with_dups ... bench: 58.56 ns/iter (+/- 24.81) -test slice::binary_search_l3_worst_case ... bench: 15.90 ns/iter (+/- 0.23) -test slice::fill_byte_sized ... bench: 6.25 ns/iter (+/- 0.03) -test slice::fold_to_last ... bench: 0.36 ns/iter (+/- 0.02) -test slice::rotate_16_usize_4 ... bench: 243.77 ns/iter (+/- 3.16) -test slice::rotate_16_usize_5 ... bench: 290.75 ns/iter (+/- 16.13) -test slice::rotate_64_usize_4 ... bench: 2,192.85 ns/iter (+/- 74.09) -test slice::rotate_64_usize_5 ... bench: 5,018.11 ns/iter (+/- 89.71) -test slice::rotate_rgb ... bench: 210.09 ns/iter (+/- 5.77) -test slice::rotate_u8 ... bench: 216.63 ns/iter (+/- 7.36) -test slice::rotate_usize ... bench: 330.26 ns/iter (+/- 2.65) -test slice::swap_with_slice_4x_usize_30 ... bench: 498.63 ns/iter (+/- 4.69) -test slice::swap_with_slice_4x_usize_3000 ... bench: 80,648.78 ns/iter (+/- 649.90) -test slice::swap_with_slice_5x_usize_30 ... bench: 743.35 ns/iter (+/- 9.51) -test slice::swap_with_slice_5x_usize_3000 ... bench: 106,530.04 ns/iter (+/- 6,933.64) -test slice::swap_with_slice_rgb_30 ... bench: 209.64 ns/iter (+/- 3.68) -test slice::swap_with_slice_rgb_3000 ... bench: 6,384.25 ns/iter (+/- 248.23) -test slice::swap_with_slice_u8_30 ... bench: 147.90 ns/iter (+/- 3.37) -test slice::swap_with_slice_u8_3000 ... bench: 2,539.80 ns/iter (+/- 28.93) -test slice::swap_with_slice_usize_30 ... bench: 192.88 ns/iter (+/- 6.45) -test slice::swap_with_slice_usize_3000 ... bench: 14,927.24 ns/iter (+/- 239.94) -test str::char_count::emoji_huge::case00_libcore ... bench: 12,015.32 ns/iter (+/- 86.85) = 30170 MB/s -test str::char_count::emoji_huge::case01_filter_count_cont_bytes ... bench: 104,559.67 ns/iter (+/- 921.03) = 3466 MB/s -test str::char_count::emoji_huge::case02_iter_increment ... bench: 148,355.42 ns/iter (+/- 1,813.86) = 2443 MB/s -test str::char_count::emoji_huge::case03_manual_char_len ... bench: 169,734.75 ns/iter (+/- 2,224.00) = 2135 MB/s -test str::char_count::emoji_large::case00_libcore ... bench: 187.75 ns/iter (+/- 0.83) = 30288 MB/s -test str::char_count::emoji_large::case01_filter_count_cont_bytes ... bench: 1,633.15 ns/iter (+/- 12.97) = 3468 MB/s -test str::char_count::emoji_large::case02_iter_increment ... bench: 2,313.55 ns/iter (+/- 87.35) = 2448 MB/s -test str::char_count::emoji_large::case03_manual_char_len ... bench: 2,642.17 ns/iter (+/- 37.84) = 2143 MB/s -test str::char_count::emoji_medium::case00_libcore ... bench: 24.49 ns/iter (+/- 0.16) = 29500 MB/s -test str::char_count::emoji_medium::case01_filter_count_cont_bytes ... bench: 203.63 ns/iter (+/- 2.58) = 3487 MB/s -test str::char_count::emoji_medium::case02_iter_increment ... bench: 295.29 ns/iter (+/- 3.76) = 2400 MB/s -test str::char_count::emoji_medium::case03_manual_char_len ... bench: 337.83 ns/iter (+/- 3.68) = 2100 MB/s -test str::char_count::emoji_small::case00_libcore ... bench: 5.76 ns/iter (+/- 0.18) = 13600 MB/s -test str::char_count::emoji_small::case01_filter_count_cont_bytes ... bench: 19.92 ns/iter (+/- 0.58) = 3578 MB/s -test str::char_count::emoji_small::case02_iter_increment ... bench: 12.31 ns/iter (+/- 0.06) = 5666 MB/s -test str::char_count::emoji_small::case03_manual_char_len ... bench: 14.95 ns/iter (+/- 0.54) = 4857 MB/s -test str::char_count::emoji_tiny::case00_libcore ... bench: 2.86 ns/iter (+/- 0.14) = 4000 MB/s -test str::char_count::emoji_tiny::case01_filter_count_cont_bytes ... bench: 2.63 ns/iter (+/- 0.01) = 4000 MB/s -test str::char_count::emoji_tiny::case02_iter_increment ... bench: 1.24 ns/iter (+/- 0.14) = 8000 MB/s -test str::char_count::emoji_tiny::case03_manual_char_len ... bench: 1.47 ns/iter (+/- 0.06) = 8000 MB/s -test str::char_count::en_huge::case00_libcore ... bench: 11,402.20 ns/iter (+/- 87.02) = 30220 MB/s -test str::char_count::en_huge::case01_filter_count_cont_bytes ... bench: 99,248.04 ns/iter (+/- 1,468.72) = 3471 MB/s -test str::char_count::en_huge::case02_iter_increment ... bench: 88,170.19 ns/iter (+/- 1,544.44) = 3908 MB/s -test str::char_count::en_huge::case03_manual_char_len ... bench: 89,597.87 ns/iter (+/- 2,206.80) = 3845 MB/s -test str::char_count::en_large::case00_libcore ... bench: 178.68 ns/iter (+/- 0.49) = 30247 MB/s -test str::char_count::en_large::case01_filter_count_cont_bytes ... bench: 1,551.71 ns/iter (+/- 21.79) = 3471 MB/s -test str::char_count::en_large::case02_iter_increment ... bench: 1,383.70 ns/iter (+/- 55.43) = 3892 MB/s -test str::char_count::en_large::case03_manual_char_len ... bench: 1,389.78 ns/iter (+/- 3.17) = 3876 MB/s -test str::char_count::en_medium::case00_libcore ... bench: 23.06 ns/iter (+/- 0.19) = 29260 MB/s -test str::char_count::en_medium::case01_filter_count_cont_bytes ... bench: 194.31 ns/iter (+/- 2.33) = 3469 MB/s -test str::char_count::en_medium::case02_iter_increment ... bench: 181.68 ns/iter (+/- 6.69) = 3718 MB/s -test str::char_count::en_medium::case03_manual_char_len ... bench: 184.31 ns/iter (+/- 7.02) = 3657 MB/s -test str::char_count::en_small::case00_libcore ... bench: 4.69 ns/iter (+/- 1.15) = 8750 MB/s -test str::char_count::en_small::case01_filter_count_cont_bytes ... bench: 9.64 ns/iter (+/- 0.15) = 3888 MB/s -test str::char_count::en_small::case02_iter_increment ... bench: 8.84 ns/iter (+/- 0.50) = 4375 MB/s -test str::char_count::en_small::case03_manual_char_len ... bench: 9.11 ns/iter (+/- 0.25) = 3888 MB/s -test str::char_count::en_tiny::case00_libcore ... bench: 2.72 ns/iter (+/- 0.03) = 4000 MB/s -test str::char_count::en_tiny::case01_filter_count_cont_bytes ... bench: 2.63 ns/iter (+/- 0.03) = 4000 MB/s -test str::char_count::en_tiny::case02_iter_increment ... bench: 2.03 ns/iter (+/- 0.06) = 4000 MB/s -test str::char_count::en_tiny::case03_manual_char_len ... bench: 2.48 ns/iter (+/- 0.03) = 4000 MB/s -test str::char_count::ru_huge::case00_libcore ... bench: 10,756.41 ns/iter (+/- 88.35) = 30226 MB/s -test str::char_count::ru_huge::case01_filter_count_cont_bytes ... bench: 93,959.59 ns/iter (+/- 1,347.70) = 3460 MB/s -test str::char_count::ru_huge::case02_iter_increment ... bench: 97,553.79 ns/iter (+/- 2,932.36) = 3332 MB/s -test str::char_count::ru_huge::case03_manual_char_len ... bench: 71,966.17 ns/iter (+/- 1,900.33) = 4517 MB/s -test str::char_count::ru_large::case00_libcore ... bench: 169.47 ns/iter (+/- 0.70) = 30059 MB/s -test str::char_count::ru_large::case01_filter_count_cont_bytes ... bench: 1,463.32 ns/iter (+/- 15.41) = 3472 MB/s -test str::char_count::ru_large::case02_iter_increment ... bench: 1,534.06 ns/iter (+/- 31.47) = 3311 MB/s -test str::char_count::ru_large::case03_manual_char_len ... bench: 1,138.12 ns/iter (+/- 70.34) = 4463 MB/s -test str::char_count::ru_medium::case00_libcore ... bench: 23.39 ns/iter (+/- 0.09) = 27608 MB/s -test str::char_count::ru_medium::case01_filter_count_cont_bytes ... bench: 185.42 ns/iter (+/- 3.20) = 3432 MB/s -test str::char_count::ru_medium::case02_iter_increment ... bench: 192.50 ns/iter (+/- 4.26) = 3307 MB/s -test str::char_count::ru_medium::case03_manual_char_len ... bench: 143.48 ns/iter (+/- 10.24) = 4440 MB/s -test str::char_count::ru_small::case00_libcore ... bench: 3.84 ns/iter (+/- 0.25) = 10666 MB/s -test str::char_count::ru_small::case01_filter_count_cont_bytes ... bench: 9.53 ns/iter (+/- 0.13) = 3555 MB/s -test str::char_count::ru_small::case02_iter_increment ... bench: 5.77 ns/iter (+/- 3.44) = 6400 MB/s -test str::char_count::ru_small::case03_manual_char_len ... bench: 6.47 ns/iter (+/- 0.62) = 5333 MB/s -test str::char_count::ru_tiny::case00_libcore ... bench: 3.13 ns/iter (+/- 0.02) = 3333 MB/s -test str::char_count::ru_tiny::case01_filter_count_cont_bytes ... bench: 2.92 ns/iter (+/- 0.01) = 5000 MB/s -test str::char_count::ru_tiny::case02_iter_increment ... bench: 2.03 ns/iter (+/- 0.02) = 5000 MB/s -test str::char_count::ru_tiny::case03_manual_char_len ... bench: 2.04 ns/iter (+/- 0.03) = 5000 MB/s -test str::char_count::zh_huge::case00_libcore ... bench: 9,987.76 ns/iter (+/- 24.49) = 30247 MB/s -test str::char_count::zh_huge::case01_filter_count_cont_bytes ... bench: 87,126.53 ns/iter (+/- 1,098.13) = 3467 MB/s -test str::char_count::zh_huge::case02_iter_increment ... bench: 155,591.86 ns/iter (+/- 1,627.74) = 1941 MB/s -test str::char_count::zh_huge::case03_manual_char_len ... bench: 178,971.58 ns/iter (+/- 2,212.78) = 1687 MB/s -test str::char_count::zh_large::case00_libcore ... bench: 157.89 ns/iter (+/- 0.32) = 30063 MB/s -test str::char_count::zh_large::case01_filter_count_cont_bytes ... bench: 1,360.44 ns/iter (+/- 56.14) = 3470 MB/s -test str::char_count::zh_large::case02_iter_increment ... bench: 2,443.82 ns/iter (+/- 11.55) = 1932 MB/s -test str::char_count::zh_large::case03_manual_char_len ... bench: 2,811.20 ns/iter (+/- 25.39) = 1679 MB/s -test str::char_count::zh_medium::case00_libcore ... bench: 21.79 ns/iter (+/- 0.07) = 28095 MB/s -test str::char_count::zh_medium::case01_filter_count_cont_bytes ... bench: 172.81 ns/iter (+/- 2.22) = 3430 MB/s -test str::char_count::zh_medium::case02_iter_increment ... bench: 280.80 ns/iter (+/- 0.59) = 2107 MB/s -test str::char_count::zh_medium::case03_manual_char_len ... bench: 327.62 ns/iter (+/- 4.13) = 1804 MB/s -test str::char_count::zh_small::case00_libcore ... bench: 4.80 ns/iter (+/- 0.01) = 9000 MB/s -test str::char_count::zh_small::case01_filter_count_cont_bytes ... bench: 10.72 ns/iter (+/- 0.15) = 3600 MB/s -test str::char_count::zh_small::case02_iter_increment ... bench: 7.72 ns/iter (+/- 0.08) = 5142 MB/s -test str::char_count::zh_small::case03_manual_char_len ... bench: 9.90 ns/iter (+/- 0.13) = 4000 MB/s -test str::char_count::zh_tiny::case00_libcore ... bench: 2.90 ns/iter (+/- 0.00) = 4500 MB/s -test str::char_count::zh_tiny::case01_filter_count_cont_bytes ... bench: 2.77 ns/iter (+/- 0.03) = 4500 MB/s -test str::char_count::zh_tiny::case02_iter_increment ... bench: 1.58 ns/iter (+/- 0.02) = 9000 MB/s -test str::char_count::zh_tiny::case03_manual_char_len ... bench: 2.03 ns/iter (+/- 0.15) = 4500 MB/s -test str::debug::ascii_escapes ... bench: 175.30 ns/iter (+/- 5.24) -test str::debug::ascii_only ... bench: 99.81 ns/iter (+/- 2.40) -test str::debug::mixed ... bench: 617.90 ns/iter (+/- 13.75) -test str::debug::mostly_unicode ... bench: 537.83 ns/iter (+/- 21.86) -test str::debug::some_unicode ... bench: 136.16 ns/iter (+/- 2.82) -test str::iter::chars_advance_by_0001 ... bench: 0.39 ns/iter (+/- 0.01) -test str::iter::chars_advance_by_0010 ... bench: 4.19 ns/iter (+/- 0.19) -test str::iter::chars_advance_by_1000 ... bench: 252.57 ns/iter (+/- 4.56) -test str::str_validate_emoji ... bench: 1,979.91 ns/iter (+/- 51.57) -test tuple::bench_tuple_comparison ... bench: 11.53 ns/iter (+/- 0.24) - -test result: ok. 0 passed; 0 failed; 0 ignored; 476 measured; 0 filtered out; finished in 444.67s \ No newline at end of file +test any::bench_downcast_ref ... bench: 1.01 ns/iter (+/- 0.02) +test array::map_256byte_8byte_256 ... bench: 3,206.04 ns/iter (+/- 19.04) +test array::map_8byte_256byte_256 ... bench: 5,494.49 ns/iter (+/- 10.82) +test array::map_8byte_8byte_256 ... bench: 2,240.10 ns/iter (+/- 3.02) +test array::map_8byte_8byte_64 ... bench: 327.53 ns/iter (+/- 2.39) +test array::map_8byte_8byte_8 ... bench: 44.44 ns/iter (+/- 0.24) +test ascii::bench_ascii_escape_display_mixed ... bench: 2,950.28 ns/iter (+/- 83.38) +test ascii::bench_ascii_escape_display_no_escape ... bench: 59.66 ns/iter (+/- 1.01) +test ascii::is_ascii::long::case00_libcore ... bench: 10.99 ns/iter (+/- 0.35) = 699000 MB/s +test ascii::is_ascii::long::case01_iter_all ... bench: 97.35 ns/iter (+/- 1.07) = 72061 MB/s +test ascii::is_ascii::long::case02_align_to ... bench: 11.58 ns/iter (+/- 9.20) = 635454 MB/s +test ascii::is_ascii::long::case03_align_to_unrolled ... bench: 6.24 ns/iter (+/- 0.73) = 1165000 MB/s +test ascii::is_ascii::medium::case00_libcore ... bench: 1.15 ns/iter (+/- 0.07) = 32000 MB/s +test ascii::is_ascii::medium::case01_iter_all ... bench: 7.75 ns/iter (+/- 0.02) = 4571 MB/s +test ascii::is_ascii::medium::case02_align_to ... bench: 1.92 ns/iter (+/- 0.03) = 32000 MB/s +test ascii::is_ascii::medium::case03_align_to_unrolled ... bench: 1.61 ns/iter (+/- 0.08) = 32000 MB/s +test ascii::is_ascii::short::case00_libcore ... bench: 2.00 ns/iter (+/- 0.20) = 3500 MB/s +test ascii::is_ascii::short::case01_iter_all ... bench: 2.38 ns/iter (+/- 0.07) = 3500 MB/s +test ascii::is_ascii::short::case02_align_to ... bench: 1.81 ns/iter (+/- 0.04) = 7000 MB/s +test ascii::is_ascii::short::case03_align_to_unrolled ... bench: 2.60 ns/iter (+/- 0.04) = 3500 MB/s +test ascii::is_ascii::unaligned_both::case00_libcore ... bench: 0.86 ns/iter (+/- 0.02) = 30000 MB/s +test ascii::is_ascii::unaligned_both::case01_iter_all ... bench: 3.91 ns/iter (+/- 0.07) = 10000 MB/s +test ascii::is_ascii::unaligned_both::case02_align_to ... bench: 4.64 ns/iter (+/- 0.26) = 7500 MB/s +test ascii::is_ascii::unaligned_both::case03_align_to_unrolled ... bench: 3.88 ns/iter (+/- 0.07) = 10000 MB/s +test ascii::is_ascii::unaligned_head::case00_libcore ... bench: 1.21 ns/iter (+/- 0.02) = 31000 MB/s +test ascii::is_ascii::unaligned_head::case01_iter_all ... bench: 7.95 ns/iter (+/- 0.47) = 4428 MB/s +test ascii::is_ascii::unaligned_head::case02_align_to ... bench: 3.67 ns/iter (+/- 1.40) = 10333 MB/s +test ascii::is_ascii::unaligned_head::case03_align_to_unrolled ... bench: 4.80 ns/iter (+/- 0.18) = 7750 MB/s +test ascii::is_ascii::unaligned_tail::case00_libcore ... bench: 0.88 ns/iter (+/- 0.02) = 31000 MB/s +test ascii::is_ascii::unaligned_tail::case01_iter_all ... bench: 3.96 ns/iter (+/- 0.22) = 10333 MB/s +test ascii::is_ascii::unaligned_tail::case02_align_to ... bench: 2.35 ns/iter (+/- 0.01) = 15500 MB/s +test ascii::is_ascii::unaligned_tail::case03_align_to_unrolled ... bench: 4.16 ns/iter (+/- 0.21) = 7750 MB/s +test ascii::long::case00_alloc_only ... bench: 64.53 ns/iter (+/- 0.68) = 109218 MB/s +test ascii::long::case01_black_box_read_each_byte ... bench: 1,185.57 ns/iter (+/- 120.22) = 5898 MB/s +test ascii::long::case02_lookup_table ... bench: 1,106.83 ns/iter (+/- 31.86) = 6320 MB/s +test ascii::long::case03_branch_and_subtract ... bench: 230.31 ns/iter (+/- 16.54) = 30391 MB/s +test ascii::long::case04_branch_and_mask ... bench: 287.90 ns/iter (+/- 1.68) = 24355 MB/s +test ascii::long::case05_branchless ... bench: 255.60 ns/iter (+/- 2.36) = 27411 MB/s +test ascii::long::case06_libcore ... bench: 226.31 ns/iter (+/- 5.62) = 30929 MB/s +test ascii::long::case07_fake_simd_u32 ... bench: 257.01 ns/iter (+/- 4.18) = 27198 MB/s +test ascii::long::case08_fake_simd_u64 ... bench: 256.53 ns/iter (+/- 5.92) = 27304 MB/s +test ascii::long::case09_mask_mult_bool_branchy_lookup_table ... bench: 3,389.98 ns/iter (+/- 48.12) = 2062 MB/s +test ascii::long::case10_mask_mult_bool_lookup_table ... bench: 2,565.79 ns/iter (+/- 17.20) = 2725 MB/s +test ascii::long::case11_mask_mult_bool_match_range ... bench: 227.35 ns/iter (+/- 5.02) = 30792 MB/s +test ascii::long::case12_mask_shifted_bool_match_range ... bench: 227.42 ns/iter (+/- 5.11) = 30792 MB/s +test ascii::long::case13_subtract_shifted_bool_match_range ... bench: 225.49 ns/iter (+/- 4.92) = 31066 MB/s +test ascii::long::case14_subtract_multiplied_bool_match_range ... bench: 226.05 ns/iter (+/- 6.45) = 30929 MB/s +test ascii::long::is_ascii ... bench: 130.55 ns/iter (+/- 1.47) = 53769 MB/s +test ascii::long::is_ascii_alphabetic ... bench: 64.69 ns/iter (+/- 0.63) = 109218 MB/s +test ascii::long::is_ascii_alphanumeric ... bench: 64.62 ns/iter (+/- 0.60) = 109218 MB/s +test ascii::long::is_ascii_control ... bench: 64.81 ns/iter (+/- 0.71) = 109218 MB/s +test ascii::long::is_ascii_digit ... bench: 64.64 ns/iter (+/- 0.75) = 109218 MB/s +test ascii::long::is_ascii_graphic ... bench: 64.57 ns/iter (+/- 0.54) = 109218 MB/s +test ascii::long::is_ascii_hexdigit ... bench: 64.76 ns/iter (+/- 0.73) = 109218 MB/s +test ascii::long::is_ascii_lowercase ... bench: 63.00 ns/iter (+/- 0.93) = 112741 MB/s +test ascii::long::is_ascii_punctuation ... bench: 64.86 ns/iter (+/- 0.84) = 109218 MB/s +test ascii::long::is_ascii_uppercase ... bench: 65.45 ns/iter (+/- 1.05) = 107538 MB/s +test ascii::long::is_ascii_whitespace ... bench: 64.73 ns/iter (+/- 0.97) = 109218 MB/s +test ascii::medium::case00_alloc_only ... bench: 5.97 ns/iter (+/- 0.11) = 6400 MB/s +test ascii::medium::case01_black_box_read_each_byte ... bench: 13.36 ns/iter (+/- 0.57) = 2461 MB/s +test ascii::medium::case02_lookup_table ... bench: 13.63 ns/iter (+/- 0.36) = 2461 MB/s +test ascii::medium::case03_branch_and_subtract ... bench: 6.30 ns/iter (+/- 0.09) = 5333 MB/s +test ascii::medium::case04_branch_and_mask ... bench: 6.54 ns/iter (+/- 0.14) = 5333 MB/s +test ascii::medium::case05_branchless ... bench: 6.41 ns/iter (+/- 0.12) = 5333 MB/s +test ascii::medium::case06_libcore ... bench: 6.34 ns/iter (+/- 0.12) = 5333 MB/s +test ascii::medium::case07_fake_simd_u32 ... bench: 7.50 ns/iter (+/- 0.09) = 4571 MB/s +test ascii::medium::case08_fake_simd_u64 ... bench: 7.57 ns/iter (+/- 0.09) = 4571 MB/s +test ascii::medium::case09_mask_mult_bool_branchy_lookup_table ... bench: 21.81 ns/iter (+/- 0.38) = 1523 MB/s +test ascii::medium::case10_mask_mult_bool_lookup_table ... bench: 19.45 ns/iter (+/- 0.52) = 1684 MB/s +test ascii::medium::case11_mask_mult_bool_match_range ... bench: 6.34 ns/iter (+/- 0.18) = 5333 MB/s +test ascii::medium::case12_mask_shifted_bool_match_range ... bench: 6.35 ns/iter (+/- 0.13) = 5333 MB/s +test ascii::medium::case13_subtract_shifted_bool_match_range ... bench: 6.32 ns/iter (+/- 0.16) = 5333 MB/s +test ascii::medium::case14_subtract_multiplied_bool_match_range ... bench: 6.34 ns/iter (+/- 0.15) = 5333 MB/s +test ascii::medium::is_ascii ... bench: 5.99 ns/iter (+/- 0.12) = 6400 MB/s +test ascii::medium::is_ascii_alphabetic ... bench: 7.29 ns/iter (+/- 0.18) = 4571 MB/s +test ascii::medium::is_ascii_alphanumeric ... bench: 7.82 ns/iter (+/- 0.39) = 4571 MB/s +test ascii::medium::is_ascii_control ... bench: 6.38 ns/iter (+/- 0.23) = 5333 MB/s +test ascii::medium::is_ascii_digit ... bench: 6.30 ns/iter (+/- 0.57) = 5333 MB/s +test ascii::medium::is_ascii_graphic ... bench: 7.69 ns/iter (+/- 0.27) = 4571 MB/s +test ascii::medium::is_ascii_hexdigit ... bench: 12.09 ns/iter (+/- 10.58) = 2666 MB/s +test ascii::medium::is_ascii_lowercase ... bench: 6.19 ns/iter (+/- 0.35) = 5333 MB/s +test ascii::medium::is_ascii_punctuation ... bench: 6.98 ns/iter (+/- 0.11) = 5333 MB/s +test ascii::medium::is_ascii_uppercase ... bench: 6.38 ns/iter (+/- 0.28) = 5333 MB/s +test ascii::medium::is_ascii_whitespace ... bench: 6.00 ns/iter (+/- 0.21) = 5333 MB/s +test ascii::short::case00_alloc_only ... bench: 6.14 ns/iter (+/- 0.28) = 1166 MB/s +test ascii::short::case01_black_box_read_each_byte ... bench: 6.36 ns/iter (+/- 0.54) = 1166 MB/s +test ascii::short::case02_lookup_table ... bench: 6.11 ns/iter (+/- 0.28) = 1166 MB/s +test ascii::short::case03_branch_and_subtract ... bench: 6.10 ns/iter (+/- 0.28) = 1166 MB/s +test ascii::short::case04_branch_and_mask ... bench: 6.23 ns/iter (+/- 0.19) = 1166 MB/s +test ascii::short::case05_branchless ... bench: 6.20 ns/iter (+/- 0.27) = 1166 MB/s +test ascii::short::case06_libcore ... bench: 6.20 ns/iter (+/- 0.25) = 1166 MB/s +test ascii::short::case07_fake_simd_u32 ... bench: 7.48 ns/iter (+/- 0.17) = 1000 MB/s +test ascii::short::case08_fake_simd_u64 ... bench: 8.21 ns/iter (+/- 0.10) = 875 MB/s +test ascii::short::case09_mask_mult_bool_branchy_lookup_table ... bench: 6.16 ns/iter (+/- 0.26) = 1166 MB/s +test ascii::short::case10_mask_mult_bool_lookup_table ... bench: 6.15 ns/iter (+/- 0.21) = 1166 MB/s +test ascii::short::case11_mask_mult_bool_match_range ... bench: 6.16 ns/iter (+/- 0.20) = 1166 MB/s +test ascii::short::case12_mask_shifted_bool_match_range ... bench: 6.16 ns/iter (+/- 0.30) = 1166 MB/s +test ascii::short::case13_subtract_shifted_bool_match_range ... bench: 6.17 ns/iter (+/- 0.21) = 1166 MB/s +test ascii::short::case14_subtract_multiplied_bool_match_range ... bench: 6.19 ns/iter (+/- 0.31) = 1166 MB/s +test ascii::short::is_ascii ... bench: 6.30 ns/iter (+/- 0.13) = 1166 MB/s +test ascii::short::is_ascii_alphabetic ... bench: 6.35 ns/iter (+/- 0.32) = 1166 MB/s +test ascii::short::is_ascii_alphanumeric ... bench: 6.25 ns/iter (+/- 0.07) = 1166 MB/s +test ascii::short::is_ascii_control ... bench: 6.32 ns/iter (+/- 0.24) = 1166 MB/s +test ascii::short::is_ascii_digit ... bench: 6.29 ns/iter (+/- 0.28) = 1166 MB/s +test ascii::short::is_ascii_graphic ... bench: 6.33 ns/iter (+/- 0.39) = 1166 MB/s +test ascii::short::is_ascii_hexdigit ... bench: 6.36 ns/iter (+/- 0.24) = 1166 MB/s +test ascii::short::is_ascii_lowercase ... bench: 6.26 ns/iter (+/- 0.21) = 1166 MB/s +test ascii::short::is_ascii_punctuation ... bench: 7.14 ns/iter (+/- 0.27) = 1000 MB/s +test ascii::short::is_ascii_uppercase ... bench: 6.26 ns/iter (+/- 0.11) = 1166 MB/s +test ascii::short::is_ascii_whitespace ... bench: 6.33 ns/iter (+/- 0.21) = 1166 MB/s +test char::methods::bench_ascii_char_to_lowercase ... bench: 11,312.93 ns/iter (+/- 150.81) +test char::methods::bench_ascii_char_to_uppercase ... bench: 13,298.69 ns/iter (+/- 217.22) +test char::methods::bench_ascii_mix_to_lowercase ... bench: 31,329.65 ns/iter (+/- 429.82) +test char::methods::bench_ascii_mix_to_uppercase ... bench: 31,695.76 ns/iter (+/- 470.68) +test char::methods::bench_non_ascii_char_to_lowercase ... bench: 51,472.71 ns/iter (+/- 512.91) +test char::methods::bench_non_ascii_char_to_uppercase ... bench: 52,540.23 ns/iter (+/- 593.48) +test char::methods::bench_to_ascii_lowercase ... bench: 5,079.62 ns/iter (+/- 77.97) +test char::methods::bench_to_ascii_uppercase ... bench: 5,073.40 ns/iter (+/- 51.57) +test char::methods::bench_to_digit_radix_10 ... bench: 3,359.35 ns/iter (+/- 22.00) +test char::methods::bench_to_digit_radix_16 ... bench: 9,085.89 ns/iter (+/- 229.68) +test char::methods::bench_to_digit_radix_2 ... bench: 3,396.54 ns/iter (+/- 141.49) +test char::methods::bench_to_digit_radix_36 ... bench: 13,703.55 ns/iter (+/- 315.41) +test char::methods::bench_to_digit_radix_var ... bench: 16,752.42 ns/iter (+/- 101.78) +test fmt::write_str_macro1 ... bench: 7,760.55 ns/iter (+/- 137.81) +test fmt::write_str_macro2 ... bench: 7,723.07 ns/iter (+/- 125.74) +test fmt::write_str_macro_debug ... bench: 117,978.57 ns/iter (+/- 5,630.22) +test fmt::write_str_macro_debug_ascii ... bench: 14,746.18 ns/iter (+/- 298.78) +test fmt::write_str_ref ... bench: 1,715.02 ns/iter (+/- 14.23) +test fmt::write_str_value ... bench: 1,706.59 ns/iter (+/- 19.54) +test fmt::write_u128_max ... bench: 33.66 ns/iter (+/- 1.14) +test fmt::write_u128_min ... bench: 6.15 ns/iter (+/- 0.14) +test fmt::write_u64_max ... bench: 23.19 ns/iter (+/- 0.68) +test fmt::write_u64_min ... bench: 6.07 ns/iter (+/- 0.19) +test fmt::write_vec_macro1 ... bench: 9,109.33 ns/iter (+/- 179.80) +test fmt::write_vec_macro2 ... bench: 9,046.36 ns/iter (+/- 251.54) +test fmt::write_vec_macro_debug ... bench: 122,249.35 ns/iter (+/- 9,406.43) +test fmt::write_vec_ref ... bench: 1,708.98 ns/iter (+/- 25.06) +test fmt::write_vec_value ... bench: 1,715.64 ns/iter (+/- 19.03) +test hash::sip::bench_bytes_4 ... bench: 6.25 ns/iter (+/- 0.24) = 666 MB/s +test hash::sip::bench_bytes_7 ... bench: 7.00 ns/iter (+/- 0.45) = 1000 MB/s +test hash::sip::bench_bytes_8 ... bench: 8.21 ns/iter (+/- 0.17) = 1000 MB/s +test hash::sip::bench_bytes_a_16 ... bench: 10.43 ns/iter (+/- 0.59) = 1600 MB/s +test hash::sip::bench_bytes_b_32 ... bench: 14.57 ns/iter (+/- 0.27) = 2285 MB/s +test hash::sip::bench_bytes_c_128 ... bench: 41.39 ns/iter (+/- 0.47) = 3121 MB/s +test hash::sip::bench_long_str ... bench: 130.21 ns/iter (+/- 2.86) +test hash::sip::bench_str_of_8_bytes ... bench: 9.04 ns/iter (+/- 0.25) +test hash::sip::bench_str_over_8_bytes ... bench: 9.54 ns/iter (+/- 0.24) +test hash::sip::bench_str_under_8_bytes ... bench: 8.26 ns/iter (+/- 0.40) +test hash::sip::bench_u32 ... bench: 6.46 ns/iter (+/- 0.20) = 1333 MB/s +test hash::sip::bench_u32_keyed ... bench: 6.79 ns/iter (+/- 0.09) = 1333 MB/s +test hash::sip::bench_u64 ... bench: 8.31 ns/iter (+/- 0.13) = 1000 MB/s +test iter::bench_chain_partial_cmp ... bench: 75,358.32 ns/iter (+/- 945.71) +test iter::bench_cycle_skip_take_ref_sum ... bench: 441,084.40 ns/iter (+/- 3,223.93) +test iter::bench_cycle_skip_take_sum ... bench: 442,516.90 ns/iter (+/- 10,864.75) +test iter::bench_cycle_take_ref_sum ... bench: 459,411.00 ns/iter (+/- 1,937.65) +test iter::bench_cycle_take_skip_ref_sum ... bench: 394,099.05 ns/iter (+/- 5,505.22) +test iter::bench_cycle_take_skip_sum ... bench: 394,426.60 ns/iter (+/- 4,772.96) +test iter::bench_cycle_take_sum ... bench: 462,110.35 ns/iter (+/- 4,428.07) +test iter::bench_enumerate_chain_ref_sum ... bench: 593,977.66 ns/iter (+/- 62,323.53) +test iter::bench_enumerate_chain_sum ... bench: 570,116.11 ns/iter (+/- 47,921.10) +test iter::bench_enumerate_ref_sum ... bench: 250,504.71 ns/iter (+/- 19,598.82) +test iter::bench_enumerate_sum ... bench: 272,405.66 ns/iter (+/- 13,359.64) +test iter::bench_filter_chain_count ... bench: 637,202.90 ns/iter (+/- 62,404.36) +test iter::bench_filter_chain_ref_count ... bench: 576,151.97 ns/iter (+/- 3,457.31) +test iter::bench_filter_chain_ref_sum ... bench: 718,038.80 ns/iter (+/- 6,321.33) +test iter::bench_filter_chain_sum ... bench: 721,293.40 ns/iter (+/- 40,739.17) +test iter::bench_filter_count ... bench: 394,196.20 ns/iter (+/- 81,838.92) +test iter::bench_filter_map_chain_ref_sum ... bench: 580,798.83 ns/iter (+/- 8,252.68) +test iter::bench_filter_map_chain_sum ... bench: 583,301.61 ns/iter (+/- 8,745.36) +test iter::bench_filter_map_ref_sum ... bench: 286,916.30 ns/iter (+/- 2,482.73) +test iter::bench_filter_map_sum ... bench: 248,622.46 ns/iter (+/- 18,576.61) +test iter::bench_filter_ref_count ... bench: 397,686.20 ns/iter (+/- 61,700.12) +test iter::bench_filter_ref_sum ... bench: 349,492.40 ns/iter (+/- 10,832.04) +test iter::bench_filter_sum ... bench: 364,411.47 ns/iter (+/- 11,596.27) +test iter::bench_flat_map_chain_ref_sum ... bench: 429,838.50 ns/iter (+/- 3,338.18) +test iter::bench_flat_map_chain_sum ... bench: 431,041.90 ns/iter (+/- 4,604.68) +test iter::bench_flat_map_ref_sum ... bench: 216,140.73 ns/iter (+/- 3,572.75) +test iter::bench_flat_map_sum ... bench: 216,061.07 ns/iter (+/- 2,021.07) +test iter::bench_for_each_chain_fold ... bench: 428,566.92 ns/iter (+/- 3,233.42) +test iter::bench_for_each_chain_loop ... bench: 904,839.57 ns/iter (+/- 62,111.59) +test iter::bench_for_each_chain_ref_fold ... bench: 429,882.25 ns/iter (+/- 3,576.21) +test iter::bench_fuse_chain_ref_sum ... bench: 429,595.05 ns/iter (+/- 5,210.45) +test iter::bench_fuse_chain_sum ... bench: 430,110.00 ns/iter (+/- 5,403.46) +test iter::bench_fuse_ref_sum ... bench: 216,089.43 ns/iter (+/- 908.47) +test iter::bench_fuse_sum ... bench: 215,783.17 ns/iter (+/- 10,697.27) +test iter::bench_inspect_chain_ref_sum ... bench: 429,876.25 ns/iter (+/- 3,871.20) +test iter::bench_inspect_chain_sum ... bench: 429,833.85 ns/iter (+/- 7,311.01) +test iter::bench_inspect_ref_sum ... bench: 215,576.30 ns/iter (+/- 6,548.63) +test iter::bench_inspect_sum ... bench: 214,837.12 ns/iter (+/- 4,011.95) +test iter::bench_lt ... bench: 27,593.14 ns/iter (+/- 45.65) +test iter::bench_max ... bench: 90.10 ns/iter (+/- 3.40) +test iter::bench_max_by_key ... bench: 93.99 ns/iter (+/- 2.55) +test iter::bench_max_by_key2 ... bench: 814.02 ns/iter (+/- 4.26) +test iter::bench_multiple_take ... bench: 47.66 ns/iter (+/- 0.33) +test iter::bench_next_chunk_copied ... bench: 24.40 ns/iter (+/- 0.23) +test iter::bench_next_chunk_filter_even ... bench: 22.85 ns/iter (+/- 2.58) +test iter::bench_next_chunk_filter_map_even ... bench: 24.98 ns/iter (+/- 0.16) +test iter::bench_next_chunk_filter_map_mostly_false ... bench: 311.99 ns/iter (+/- 3.74) +test iter::bench_next_chunk_filter_map_predictably_true ... bench: 17.50 ns/iter (+/- 0.11) +test iter::bench_next_chunk_filter_mostly_false ... bench: 284.02 ns/iter (+/- 7.02) +test iter::bench_next_chunk_filter_predictably_true ... bench: 12.23 ns/iter (+/- 0.92) +test iter::bench_next_chunk_trusted_random_access ... bench: 24.30 ns/iter (+/- 0.20) +test iter::bench_partial_cmp ... bench: 42,848.48 ns/iter (+/- 468.11) +test iter::bench_peekable_chain_ref_sum ... bench: 430,270.15 ns/iter (+/- 4,293.38) +test iter::bench_peekable_chain_sum ... bench: 429,414.50 ns/iter (+/- 3,485.86) +test iter::bench_peekable_ref_sum ... bench: 215,085.42 ns/iter (+/- 2,301.43) +test iter::bench_peekable_sum ... bench: 215,313.58 ns/iter (+/- 14,070.17) +test iter::bench_range_step_by_fold_u16 ... bench: 44.92 ns/iter (+/- 0.63) +test iter::bench_range_step_by_fold_usize ... bench: 164.62 ns/iter (+/- 11.79) +test iter::bench_range_step_by_loop_u32 ... bench: 82.63 ns/iter (+/- 6.71) +test iter::bench_range_step_by_sum_reducible ... bench: 0.86 ns/iter (+/- 0.00) +test iter::bench_rposition ... bench: 44.86 ns/iter (+/- 0.69) +test iter::bench_skip_chain_ref_sum ... bench: 429,816.15 ns/iter (+/- 4,754.12) +test iter::bench_skip_chain_sum ... bench: 427,295.94 ns/iter (+/- 1,078.28) +test iter::bench_skip_cycle_skip_zip_add_ref_sum ... bench: 1,859,368.10 ns/iter (+/- 11,614.42) +test iter::bench_skip_cycle_skip_zip_add_sum ... bench: 1,859,030.30 ns/iter (+/- 5,697.08) +test iter::bench_skip_ref_sum ... bench: 214,781.42 ns/iter (+/- 1,842.57) +test iter::bench_skip_sum ... bench: 213,771.42 ns/iter (+/- 1,177.65) +test iter::bench_skip_then_zip ... bench: 37.93 ns/iter (+/- 0.91) +test iter::bench_skip_trusted_random_access ... bench: 2,753.41 ns/iter (+/- 8.62) +test iter::bench_skip_while ... bench: 0.21 ns/iter (+/- 0.00) +test iter::bench_skip_while_chain_ref_sum ... bench: 429,969.05 ns/iter (+/- 20,225.97) +test iter::bench_skip_while_chain_sum ... bench: 441,990.30 ns/iter (+/- 32,521.10) +test iter::bench_skip_while_ref_sum ... bench: 214,333.90 ns/iter (+/- 2,353.29) +test iter::bench_skip_while_sum ... bench: 215,689.27 ns/iter (+/- 1,487.38) +test iter::bench_take_while_chain_ref_sum ... bench: 239,918.93 ns/iter (+/- 2,637.31) +test iter::bench_take_while_chain_sum ... bench: 240,065.33 ns/iter (+/- 4,402.37) +test iter::bench_trusted_random_access_adapters ... bench: 21,806.52 ns/iter (+/- 531.40) +test iter::bench_zip_add ... bench: 1,244.25 ns/iter (+/- 18.58) +test iter::bench_zip_copy ... bench: 108.87 ns/iter (+/- 0.77) +test iter::bench_zip_then_skip ... bench: 36.69 ns/iter (+/- 0.42) +test net::addr_parser::bench_parse_ipaddr_v4 ... bench: 9.01 ns/iter (+/- 0.20) +test net::addr_parser::bench_parse_ipaddr_v6_compress ... bench: 35.41 ns/iter (+/- 0.98) +test net::addr_parser::bench_parse_ipaddr_v6_full ... bench: 38.31 ns/iter (+/- 1.14) +test net::addr_parser::bench_parse_ipaddr_v6_v4 ... bench: 33.94 ns/iter (+/- 0.81) +test net::addr_parser::bench_parse_ipv4 ... bench: 6.69 ns/iter (+/- 0.34) +test net::addr_parser::bench_parse_ipv6_compress ... bench: 31.56 ns/iter (+/- 0.71) +test net::addr_parser::bench_parse_ipv6_full ... bench: 34.31 ns/iter (+/- 0.58) +test net::addr_parser::bench_parse_ipv6_v4 ... bench: 29.46 ns/iter (+/- 0.78) +test net::addr_parser::bench_parse_socket_v4 ... bench: 11.10 ns/iter (+/- 0.70) +test net::addr_parser::bench_parse_socket_v6 ... bench: 39.74 ns/iter (+/- 1.12) +test net::addr_parser::bench_parse_socket_v6_scope_id ... bench: 42.36 ns/iter (+/- 1.19) +test net::addr_parser::bench_parse_socketaddr_v4 ... bench: 12.38 ns/iter (+/- 0.29) +test net::addr_parser::bench_parse_socketaddr_v6 ... bench: 44.13 ns/iter (+/- 1.15) +test num::bench_i16_from_str ... bench: 21,111.16 ns/iter (+/- 676.96) +test num::bench_i16_from_str_radix_10 ... bench: 18,477.67 ns/iter (+/- 604.00) +test num::bench_i16_from_str_radix_16 ... bench: 23,309.26 ns/iter (+/- 533.38) +test num::bench_i16_from_str_radix_2 ... bench: 15,163.34 ns/iter (+/- 245.56) +test num::bench_i16_from_str_radix_36 ... bench: 22,232.01 ns/iter (+/- 742.67) +test num::bench_i32_from_str ... bench: 23,131.27 ns/iter (+/- 1,353.14) +test num::bench_i32_from_str_radix_10 ... bench: 19,787.94 ns/iter (+/- 434.85) +test num::bench_i32_from_str_radix_16 ... bench: 23,074.23 ns/iter (+/- 766.94) +test num::bench_i32_from_str_radix_2 ... bench: 14,665.28 ns/iter (+/- 466.48) +test num::bench_i32_from_str_radix_36 ... bench: 27,124.01 ns/iter (+/- 677.99) +test num::bench_i64_from_str ... bench: 26,645.19 ns/iter (+/- 1,194.19) +test num::bench_i64_from_str_radix_10 ... bench: 24,562.53 ns/iter (+/- 982.87) +test num::bench_i64_from_str_radix_16 ... bench: 24,838.69 ns/iter (+/- 837.24) +test num::bench_i64_from_str_radix_2 ... bench: 16,406.11 ns/iter (+/- 252.59) +test num::bench_i64_from_str_radix_36 ... bench: 25,029.35 ns/iter (+/- 568.17) +test num::bench_i8_from_str ... bench: 21,815.16 ns/iter (+/- 494.27) +test num::bench_i8_from_str_radix_10 ... bench: 20,844.14 ns/iter (+/- 680.15) +test num::bench_i8_from_str_radix_16 ... bench: 20,244.94 ns/iter (+/- 696.42) +test num::bench_i8_from_str_radix_2 ... bench: 15,339.66 ns/iter (+/- 126.65) +test num::bench_i8_from_str_radix_36 ... bench: 21,406.20 ns/iter (+/- 421.30) +test num::bench_u16_from_str ... bench: 17,256.52 ns/iter (+/- 826.37) +test num::bench_u16_from_str_radix_10 ... bench: 20,297.73 ns/iter (+/- 456.31) +test num::bench_u16_from_str_radix_16 ... bench: 22,513.93 ns/iter (+/- 337.28) +test num::bench_u16_from_str_radix_2 ... bench: 15,057.38 ns/iter (+/- 195.89) +test num::bench_u16_from_str_radix_36 ... bench: 21,748.76 ns/iter (+/- 677.24) +test num::bench_u32_from_str ... bench: 14,993.70 ns/iter (+/- 891.26) +test num::bench_u32_from_str_radix_10 ... bench: 18,472.33 ns/iter (+/- 538.09) +test num::bench_u32_from_str_radix_16 ... bench: 21,865.45 ns/iter (+/- 452.24) +test num::bench_u32_from_str_radix_2 ... bench: 14,039.62 ns/iter (+/- 854.46) +test num::bench_u32_from_str_radix_36 ... bench: 24,101.02 ns/iter (+/- 369.01) +test num::bench_u64_from_str ... bench: 17,091.90 ns/iter (+/- 485.40) +test num::bench_u64_from_str_radix_10 ... bench: 20,431.57 ns/iter (+/- 264.97) +test num::bench_u64_from_str_radix_16 ... bench: 28,248.75 ns/iter (+/- 1,985.68) +test num::bench_u64_from_str_radix_2 ... bench: 14,691.18 ns/iter (+/- 241.42) +test num::bench_u64_from_str_radix_36 ... bench: 28,121.56 ns/iter (+/- 512.70) +test num::bench_u8_from_str ... bench: 16,479.08 ns/iter (+/- 503.56) +test num::bench_u8_from_str_radix_10 ... bench: 15,622.71 ns/iter (+/- 820.28) +test num::bench_u8_from_str_radix_16 ... bench: 16,376.51 ns/iter (+/- 529.44) +test num::bench_u8_from_str_radix_2 ... bench: 11,445.08 ns/iter (+/- 367.30) +test num::bench_u8_from_str_radix_36 ... bench: 15,950.49 ns/iter (+/- 202.81) +test num::dec2flt::bench_0 ... bench: 7.91 ns/iter (+/- 0.02) +test num::dec2flt::bench_1e150 ... bench: 11.50 ns/iter (+/- 0.40) +test num::dec2flt::bench_42 ... bench: 7.05 ns/iter (+/- 0.08) +test num::dec2flt::bench_huge_int ... bench: 33.39 ns/iter (+/- 0.47) +test num::dec2flt::bench_long_decimal_and_exp ... bench: 38.56 ns/iter (+/- 0.82) +test num::dec2flt::bench_max ... bench: 13.99 ns/iter (+/- 0.41) +test num::dec2flt::bench_min_normal ... bench: 14.18 ns/iter (+/- 0.45) +test num::dec2flt::bench_min_subnormal ... bench: 11.24 ns/iter (+/- 0.66) +test num::dec2flt::bench_pi_long ... bench: 34.49 ns/iter (+/- 0.59) +test num::dec2flt::bench_pi_short ... bench: 10.37 ns/iter (+/- 0.32) +test num::dec2flt::bench_short_decimal ... bench: 9.95 ns/iter (+/- 0.32) +test num::flt2dec::bench_big_shortest ... bench: 77.37 ns/iter (+/- 1.35) +test num::flt2dec::bench_small_shortest ... bench: 58.95 ns/iter (+/- 0.99) +test num::flt2dec::strategy::dragon::bench_big_exact_12 ... bench: 1,260.16 ns/iter (+/- 9.04) +test num::flt2dec::strategy::dragon::bench_big_exact_3 ... bench: 593.45 ns/iter (+/- 7.88) +test num::flt2dec::strategy::dragon::bench_big_exact_inf ... bench: 25,551.41 ns/iter (+/- 70.04) +test num::flt2dec::strategy::dragon::bench_big_shortest ... bench: 2,385.55 ns/iter (+/- 7.78) +test num::flt2dec::strategy::dragon::bench_small_exact_12 ... bench: 120.27 ns/iter (+/- 2.43) +test num::flt2dec::strategy::dragon::bench_small_exact_3 ... bench: 59.93 ns/iter (+/- 1.66) +test num::flt2dec::strategy::dragon::bench_small_exact_inf ... bench: 701.37 ns/iter (+/- 4.58) +test num::flt2dec::strategy::dragon::bench_small_shortest ... bench: 137.65 ns/iter (+/- 0.49) +test num::flt2dec::strategy::grisu::bench_big_exact_12 ... bench: 31.61 ns/iter (+/- 0.53) +test num::flt2dec::strategy::grisu::bench_big_exact_3 ... bench: 18.22 ns/iter (+/- 0.14) +test num::flt2dec::strategy::grisu::bench_big_exact_inf ... bench: 25,587.51 ns/iter (+/- 88.22) +test num::flt2dec::strategy::grisu::bench_big_shortest ... bench: 38.53 ns/iter (+/- 0.46) +test num::flt2dec::strategy::grisu::bench_halfway_point_exact_inf ... bench: 348.08 ns/iter (+/- 1.03) +test num::flt2dec::strategy::grisu::bench_one_exact_inf ... bench: 348.16 ns/iter (+/- 1.32) +test num::flt2dec::strategy::grisu::bench_small_exact_12 ... bench: 25.86 ns/iter (+/- 0.42) +test num::flt2dec::strategy::grisu::bench_small_exact_3 ... bench: 16.31 ns/iter (+/- 0.26) +test num::flt2dec::strategy::grisu::bench_small_exact_inf ... bench: 736.10 ns/iter (+/- 3.93) +test num::flt2dec::strategy::grisu::bench_small_shortest ... bench: 25.17 ns/iter (+/- 0.92) +test num::flt2dec::strategy::grisu::bench_trailing_zero_exact_inf ... bench: 357.39 ns/iter (+/- 0.85) +test num::int_log::u128_log10_predictable ... bench: 6,922.88 ns/iter (+/- 142.72) +test num::int_log::u128_log10_random ... bench: 828.02 ns/iter (+/- 15.00) +test num::int_log::u128_log10_random_small ... bench: 671.04 ns/iter (+/- 10.00) +test num::int_log::u128_log_geometric ... bench: 12,698.12 ns/iter (+/- 201.04) +test num::int_log::u128_log_random ... bench: 499,418.88 ns/iter (+/- 5,324.36) +test num::int_log::u128_log_random_small ... bench: 224,372.25 ns/iter (+/- 6,173.90) +test num::int_log::u16_log10_predictable ... bench: 147.70 ns/iter (+/- 6.17) +test num::int_log::u16_log10_random ... bench: 149.45 ns/iter (+/- 2.22) +test num::int_log::u16_log10_random_small ... bench: 149.62 ns/iter (+/- 1.97) +test num::int_log::u16_log_geometric ... bench: 182.89 ns/iter (+/- 9.83) +test num::int_log::u16_log_random ... bench: 112,988.73 ns/iter (+/- 1,784.03) +test num::int_log::u16_log_random_small ... bench: 79,234.58 ns/iter (+/- 1,033.69) +test num::int_log::u32_log10_predictable ... bench: 408.45 ns/iter (+/- 8.17) +test num::int_log::u32_log10_random ... bench: 258.00 ns/iter (+/- 3.02) +test num::int_log::u32_log10_random_small ... bench: 258.08 ns/iter (+/- 2.73) +test num::int_log::u32_log_geometric ... bench: 432.60 ns/iter (+/- 6.50) +test num::int_log::u32_log_random ... bench: 153,163.48 ns/iter (+/- 1,904.44) +test num::int_log::u32_log_random_small ... bench: 62,923.86 ns/iter (+/- 1,176.30) +test num::int_log::u64_log10_predictable ... bench: 1,199.33 ns/iter (+/- 18.72) +test num::int_log::u64_log10_random ... bench: 294.53 ns/iter (+/- 4.26) +test num::int_log::u64_log10_random_small ... bench: 264.75 ns/iter (+/- 5.24) +test num::int_log::u64_log_geometric ... bench: 2,024.27 ns/iter (+/- 33.59) +test num::int_log::u64_log_random ... bench: 250,562.71 ns/iter (+/- 3,378.39) +test num::int_log::u64_log_random_small ... bench: 70,755.16 ns/iter (+/- 3,202.19) +test num::int_log::u8_log10_predictable ... bench: 49.83 ns/iter (+/- 1.97) +test num::int_log::u8_log10_random ... bench: 117.41 ns/iter (+/- 2.21) +test num::int_log::u8_log10_random_small ... bench: 117.29 ns/iter (+/- 1.73) +test num::int_log::u8_log_geometric ... bench: 53.57 ns/iter (+/- 2.81) +test num::int_log::u8_log_random ... bench: 59,928.51 ns/iter (+/- 2,173.04) +test num::int_log::u8_log_random_small ... bench: 59,857.68 ns/iter (+/- 1,917.00) +test num::int_pow::checked_pow_variable ... bench: 1,584.00 ns/iter (+/- 13.01) +test num::int_pow::overflowing_pow_variable ... bench: 1,768.47 ns/iter (+/- 67.95) +test num::int_pow::pow_m7 ... bench: 515.48 ns/iter (+/- 3.94) +test num::int_pow::pow_m8 ... bench: 514.90 ns/iter (+/- 2.93) +test num::int_pow::pow_variable ... bench: 555.18 ns/iter (+/- 4.41) +test num::int_pow::saturating_pow_variable ... bench: 1,602.17 ns/iter (+/- 13.20) +test num::int_pow::wrapping_pow_variable ... bench: 554.27 ns/iter (+/- 6.85) +test ops::alloc_obj_with_dtor ... bench: 0.22 ns/iter (+/- 0.00) +test pattern::ends_with_char ... bench: 337.72 ns/iter (+/- 4.86) +test pattern::ends_with_str ... bench: 335.77 ns/iter (+/- 2.37) +test pattern::starts_with_char ... bench: 340.58 ns/iter (+/- 3.58) +test pattern::starts_with_str ... bench: 340.41 ns/iter (+/- 5.11) +test slice::binary_search_l1 ... bench: 8.13 ns/iter (+/- 0.05) +test slice::binary_search_l1_with_dups ... bench: 8.19 ns/iter (+/- 0.17) +test slice::binary_search_l1_worst_case ... bench: 5.86 ns/iter (+/- 0.14) +test slice::binary_search_l2 ... bench: 13.60 ns/iter (+/- 0.12) +test slice::binary_search_l2_with_dups ... bench: 13.67 ns/iter (+/- 0.19) +test slice::binary_search_l2_worst_case ... bench: 9.10 ns/iter (+/- 0.05) +test slice::binary_search_l3 ... bench: 46.48 ns/iter (+/- 0.86) +test slice::binary_search_l3_with_dups ... bench: 46.83 ns/iter (+/- 2.65) +test slice::binary_search_l3_worst_case ... bench: 15.00 ns/iter (+/- 0.07) +test slice::fill_byte_sized ... bench: 5.98 ns/iter (+/- 0.02) +test slice::fold_to_last ... bench: 0.43 ns/iter (+/- 0.06) +test slice::rotate_16_usize_4 ... bench: 236.62 ns/iter (+/- 4.25) +test slice::rotate_16_usize_5 ... bench: 276.86 ns/iter (+/- 6.65) +test slice::rotate_64_usize_4 ... bench: 2,284.30 ns/iter (+/- 16.19) +test slice::rotate_64_usize_5 ... bench: 4,797.20 ns/iter (+/- 95.77) +test slice::rotate_rgb ... bench: 197.79 ns/iter (+/- 3.45) +test slice::rotate_u8 ... bench: 183.93 ns/iter (+/- 8.69) +test slice::rotate_usize ... bench: 315.71 ns/iter (+/- 4.53) +test slice::swap_with_slice_4x_usize_30 ... bench: 475.22 ns/iter (+/- 9.60) +test slice::swap_with_slice_4x_usize_3000 ... bench: 77,052.84 ns/iter (+/- 805.76) +test slice::swap_with_slice_5x_usize_30 ... bench: 714.18 ns/iter (+/- 9.50) +test slice::swap_with_slice_5x_usize_3000 ... bench: 101,651.01 ns/iter (+/- 1,685.08) +test slice::swap_with_slice_rgb_30 ... bench: 156.55 ns/iter (+/- 3.06) +test slice::swap_with_slice_rgb_3000 ... bench: 6,118.77 ns/iter (+/- 166.99) +test slice::swap_with_slice_u8_30 ... bench: 141.74 ns/iter (+/- 3.26) +test slice::swap_with_slice_u8_3000 ... bench: 2,427.10 ns/iter (+/- 20.27) +test slice::swap_with_slice_usize_30 ... bench: 183.12 ns/iter (+/- 2.09) +test slice::swap_with_slice_usize_3000 ... bench: 14,362.99 ns/iter (+/- 424.28) +test str::char_count::emoji_huge::case00_libcore ... bench: 11,518.18 ns/iter (+/- 146.16) = 31472 MB/s +test str::char_count::emoji_huge::case01_filter_count_cont_bytes ... bench: 99,862.34 ns/iter (+/- 982.74) = 3629 MB/s +test str::char_count::emoji_huge::case02_iter_increment ... bench: 141,290.90 ns/iter (+/- 1,029.58) = 2565 MB/s +test str::char_count::emoji_huge::case03_manual_char_len ... bench: 161,385.16 ns/iter (+/- 1,278.57) = 2246 MB/s +test str::char_count::emoji_large::case00_libcore ... bench: 179.79 ns/iter (+/- 0.50) = 31642 MB/s +test str::char_count::emoji_large::case01_filter_count_cont_bytes ... bench: 1,559.99 ns/iter (+/- 19.27) = 3633 MB/s +test str::char_count::emoji_large::case02_iter_increment ... bench: 2,210.17 ns/iter (+/- 15.30) = 2562 MB/s +test str::char_count::emoji_large::case03_manual_char_len ... bench: 2,527.05 ns/iter (+/- 33.40) = 2241 MB/s +test str::char_count::emoji_medium::case00_libcore ... bench: 25.21 ns/iter (+/- 0.33) = 28320 MB/s +test str::char_count::emoji_medium::case01_filter_count_cont_bytes ... bench: 194.75 ns/iter (+/- 2.45) = 3649 MB/s +test str::char_count::emoji_medium::case02_iter_increment ... bench: 281.13 ns/iter (+/- 2.44) = 2519 MB/s +test str::char_count::emoji_medium::case03_manual_char_len ... bench: 320.95 ns/iter (+/- 2.71) = 2212 MB/s +test str::char_count::emoji_small::case00_libcore ... bench: 6.47 ns/iter (+/- 0.05) = 11333 MB/s +test str::char_count::emoji_small::case01_filter_count_cont_bytes ... bench: 19.10 ns/iter (+/- 0.25) = 3578 MB/s +test str::char_count::emoji_small::case02_iter_increment ... bench: 11.91 ns/iter (+/- 0.10) = 6181 MB/s +test str::char_count::emoji_small::case03_manual_char_len ... bench: 14.19 ns/iter (+/- 0.17) = 4857 MB/s +test str::char_count::emoji_tiny::case00_libcore ... bench: 2.61 ns/iter (+/- 0.02) = 4000 MB/s +test str::char_count::emoji_tiny::case01_filter_count_cont_bytes ... bench: 2.53 ns/iter (+/- 0.06) = 4000 MB/s +test str::char_count::emoji_tiny::case02_iter_increment ... bench: 1.19 ns/iter (+/- 0.01) = 8000 MB/s +test str::char_count::emoji_tiny::case03_manual_char_len ... bench: 1.40 ns/iter (+/- 0.03) = 8000 MB/s +test str::char_count::en_huge::case00_libcore ... bench: 10,942.61 ns/iter (+/- 256.86) = 31491 MB/s +test str::char_count::en_huge::case01_filter_count_cont_bytes ... bench: 95,034.78 ns/iter (+/- 1,130.73) = 3625 MB/s +test str::char_count::en_huge::case02_iter_increment ... bench: 84,219.55 ns/iter (+/- 756.14) = 4091 MB/s +test str::char_count::en_huge::case03_manual_char_len ... bench: 85,664.74 ns/iter (+/- 225.80) = 4022 MB/s +test str::char_count::en_large::case00_libcore ... bench: 171.04 ns/iter (+/- 0.73) = 31485 MB/s +test str::char_count::en_large::case01_filter_count_cont_bytes ... bench: 1,483.58 ns/iter (+/- 16.87) = 3630 MB/s +test str::char_count::en_large::case02_iter_increment ... bench: 1,319.36 ns/iter (+/- 14.10) = 4081 MB/s +test str::char_count::en_large::case03_manual_char_len ... bench: 1,339.91 ns/iter (+/- 10.84) = 4020 MB/s +test str::char_count::en_medium::case00_libcore ... bench: 22.41 ns/iter (+/- 0.38) = 30590 MB/s +test str::char_count::en_medium::case01_filter_count_cont_bytes ... bench: 185.68 ns/iter (+/- 1.60) = 3637 MB/s +test str::char_count::en_medium::case02_iter_increment ... bench: 172.97 ns/iter (+/- 2.05) = 3912 MB/s +test str::char_count::en_medium::case03_manual_char_len ... bench: 175.07 ns/iter (+/- 1.83) = 3845 MB/s +test str::char_count::en_small::case00_libcore ... bench: 4.94 ns/iter (+/- 0.05) = 8750 MB/s +test str::char_count::en_small::case01_filter_count_cont_bytes ... bench: 9.28 ns/iter (+/- 0.12) = 3888 MB/s +test str::char_count::en_small::case02_iter_increment ... bench: 8.71 ns/iter (+/- 0.14) = 4375 MB/s +test str::char_count::en_small::case03_manual_char_len ... bench: 8.61 ns/iter (+/- 0.03) = 4375 MB/s +test str::char_count::en_tiny::case00_libcore ... bench: 2.61 ns/iter (+/- 0.06) = 4000 MB/s +test str::char_count::en_tiny::case01_filter_count_cont_bytes ... bench: 2.53 ns/iter (+/- 0.09) = 4000 MB/s +test str::char_count::en_tiny::case02_iter_increment ... bench: 1.92 ns/iter (+/- 0.00) = 8000 MB/s +test str::char_count::en_tiny::case03_manual_char_len ... bench: 2.37 ns/iter (+/- 0.01) = 4000 MB/s +test str::char_count::ru_huge::case00_libcore ... bench: 10,312.60 ns/iter (+/- 137.30) = 31528 MB/s +test str::char_count::ru_huge::case01_filter_count_cont_bytes ... bench: 89,441.26 ns/iter (+/- 1,173.73) = 3635 MB/s +test str::char_count::ru_huge::case02_iter_increment ... bench: 92,129.03 ns/iter (+/- 918.08) = 3528 MB/s +test str::char_count::ru_huge::case03_manual_char_len ... bench: 77,763.15 ns/iter (+/- 9,964.11) = 4180 MB/s +test str::char_count::ru_large::case00_libcore ... bench: 163.21 ns/iter (+/- 0.78) = 31165 MB/s +test str::char_count::ru_large::case01_filter_count_cont_bytes ... bench: 1,397.99 ns/iter (+/- 12.38) = 3636 MB/s +test str::char_count::ru_large::case02_iter_increment ... bench: 1,452.17 ns/iter (+/- 16.18) = 3498 MB/s +test str::char_count::ru_large::case03_manual_char_len ... bench: 1,321.72 ns/iter (+/- 80.57) = 3845 MB/s +test str::char_count::ru_medium::case00_libcore ... bench: 23.38 ns/iter (+/- 0.12) = 27608 MB/s +test str::char_count::ru_medium::case01_filter_count_cont_bytes ... bench: 177.77 ns/iter (+/- 2.31) = 3587 MB/s +test str::char_count::ru_medium::case02_iter_increment ... bench: 182.11 ns/iter (+/- 2.29) = 3489 MB/s +test str::char_count::ru_medium::case03_manual_char_len ... bench: 148.21 ns/iter (+/- 39.46) = 4290 MB/s +test str::char_count::ru_small::case00_libcore ... bench: 4.53 ns/iter (+/- 0.44) = 8000 MB/s +test str::char_count::ru_small::case01_filter_count_cont_bytes ... bench: 9.10 ns/iter (+/- 0.11) = 3555 MB/s +test str::char_count::ru_small::case02_iter_increment ... bench: 5.50 ns/iter (+/- 0.06) = 6400 MB/s +test str::char_count::ru_small::case03_manual_char_len ... bench: 8.44 ns/iter (+/- 0.50) = 4000 MB/s +test str::char_count::ru_tiny::case00_libcore ... bench: 3.00 ns/iter (+/- 0.02) = 5000 MB/s +test str::char_count::ru_tiny::case01_filter_count_cont_bytes ... bench: 2.79 ns/iter (+/- 0.01) = 5000 MB/s +test str::char_count::ru_tiny::case02_iter_increment ... bench: 1.92 ns/iter (+/- 0.02) = 10000 MB/s +test str::char_count::ru_tiny::case03_manual_char_len ... bench: 1.92 ns/iter (+/- 0.00) = 10000 MB/s +test str::char_count::zh_huge::case00_libcore ... bench: 9,556.05 ns/iter (+/- 115.93) = 31611 MB/s +test str::char_count::zh_huge::case01_filter_count_cont_bytes ... bench: 83,202.73 ns/iter (+/- 882.70) = 3630 MB/s +test str::char_count::zh_huge::case02_iter_increment ... bench: 148,973.90 ns/iter (+/- 1,331.11) = 2027 MB/s +test str::char_count::zh_huge::case03_manual_char_len ... bench: 171,059.75 ns/iter (+/- 1,714.55) = 1765 MB/s +test str::char_count::zh_large::case00_libcore ... bench: 152.12 ns/iter (+/- 0.64) = 31052 MB/s +test str::char_count::zh_large::case01_filter_count_cont_bytes ... bench: 1,300.31 ns/iter (+/- 14.73) = 3630 MB/s +test str::char_count::zh_large::case02_iter_increment ... bench: 2,337.98 ns/iter (+/- 14.09) = 2019 MB/s +test str::char_count::zh_large::case03_manual_char_len ... bench: 2,679.92 ns/iter (+/- 23.63) = 1761 MB/s +test str::char_count::zh_medium::case00_libcore ... bench: 22.54 ns/iter (+/- 0.53) = 26818 MB/s +test str::char_count::zh_medium::case01_filter_count_cont_bytes ... bench: 165.78 ns/iter (+/- 2.52) = 3575 MB/s +test str::char_count::zh_medium::case02_iter_increment ... bench: 270.46 ns/iter (+/- 2.36) = 2185 MB/s +test str::char_count::zh_medium::case03_manual_char_len ... bench: 313.59 ns/iter (+/- 3.27) = 1884 MB/s +test str::char_count::zh_small::case00_libcore ... bench: 5.14 ns/iter (+/- 0.05) = 7200 MB/s +test str::char_count::zh_small::case01_filter_count_cont_bytes ... bench: 10.21 ns/iter (+/- 0.11) = 3600 MB/s +test str::char_count::zh_small::case02_iter_increment ... bench: 7.39 ns/iter (+/- 0.14) = 5142 MB/s +test str::char_count::zh_small::case03_manual_char_len ... bench: 9.48 ns/iter (+/- 0.10) = 4000 MB/s +test str::char_count::zh_tiny::case00_libcore ... bench: 2.78 ns/iter (+/- 0.01) = 4500 MB/s +test str::char_count::zh_tiny::case01_filter_count_cont_bytes ... bench: 2.65 ns/iter (+/- 0.04) = 4500 MB/s +test str::char_count::zh_tiny::case02_iter_increment ... bench: 1.51 ns/iter (+/- 0.01) = 9000 MB/s +test str::char_count::zh_tiny::case03_manual_char_len ... bench: 1.92 ns/iter (+/- 0.09) = 9000 MB/s +test str::debug::ascii_escapes ... bench: 171.63 ns/iter (+/- 5.56) +test str::debug::ascii_only ... bench: 94.82 ns/iter (+/- 2.21) +test str::debug::mixed ... bench: 596.61 ns/iter (+/- 13.97) +test str::debug::mostly_unicode ... bench: 529.78 ns/iter (+/- 12.88) +test str::debug::some_unicode ... bench: 124.52 ns/iter (+/- 2.22) +test str::iter::chars_advance_by_0001 ... bench: 0.37 ns/iter (+/- 0.04) +test str::iter::chars_advance_by_0010 ... bench: 4.01 ns/iter (+/- 0.05) +test str::iter::chars_advance_by_1000 ... bench: 245.26 ns/iter (+/- 11.04) +test str::str_validate_emoji ... bench: 1,915.55 ns/iter (+/- 70.30) +test tuple::bench_tuple_comparison ... bench: 10.96 ns/iter (+/- 0.38) diff --git a/rustc_codegen_clr.sln b/rustc_codegen_clr.sln deleted file mode 100644 index e7ef9482..00000000 --- a/rustc_codegen_clr.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssemblyUtilis", "AssemblyUtilis\AssemblyUtilis.csproj", "{D17828FA-D029-44CF-B85B-CAFA49C6DEF5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D17828FA-D029-44CF-B85B-CAFA49C6DEF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D17828FA-D029-44CF-B85B-CAFA49C6DEF5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D17828FA-D029-44CF-B85B-CAFA49C6DEF5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D17828FA-D029-44CF-B85B-CAFA49C6DEF5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {FEE61B96-F9A2-45FB-89F4-1CB388A4E1FB} - EndGlobalSection -EndGlobal diff --git a/setup_rustc_fork.sh b/setup_rustc_fork.sh index ea8080d1..1d95ac75 100755 --- a/setup_rustc_fork.sh +++ b/setup_rustc_fork.sh @@ -11,7 +11,7 @@ test -e "rust" || git clone --quiet https://github.com/rust-lang/rust.git --filt pushd rust git fetch git checkout --no-progress -- . -git checkout --no-progress "$(rustc -V | cut -d' ' -f3 | tr -d '(')" +# git checkout --no-progress "$(rustc -V | cut -d' ' -f3 | tr -d '(')" git submodule update --quiet --init src/tools/cargo library/backtrace library/stdarch diff --git a/src/assembly.rs b/src/assembly.rs index 257b4bd0..cf5180b7 100644 --- a/src/assembly.rs +++ b/src/assembly.rs @@ -152,16 +152,51 @@ fn allocation_initializer_method( .into(), ); } - - for (offset, byte) in bytes.iter().enumerate() { - if *byte != 0 { - trees.push( - CILRoot::STIndI8( - CILNode::LDLoc(0) + conv_usize!(ldc_u32!(offset.try_into().unwrap())), - CILNode::LdcU8(*byte), - ) - .into(), - ); + let mut offset = 0; + while offset < bytes.len() { + let reminder = bytes.len() - offset; + match reminder { + 8.. => { + let long = u64::from_ne_bytes(bytes[offset..(offset + 8)].try_into().unwrap()); + if long != 0 { + trees.push( + CILRoot::STIndI64( + (CILNode::LDLoc(0) + conv_usize!(ldc_u32!(offset.try_into().unwrap()))) + .cast_ptr(ptr!(Type::U64)), + CILNode::LdcU64(long), + ) + .into(), + ); + } + offset += 8; + } + 4.. => { + let long = u32::from_ne_bytes(bytes[offset..(offset + 4)].try_into().unwrap()); + if long != 0 { + trees.push( + CILRoot::STIndI32( + (CILNode::LDLoc(0) + conv_usize!(ldc_u32!(offset.try_into().unwrap()))) + .cast_ptr(ptr!(Type::U32)), + CILNode::LdcU32(long), + ) + .into(), + ); + } + offset += 4; + } + _ => { + let byte = bytes[offset]; + if byte != 0 { + trees.push( + CILRoot::STIndI8( + CILNode::LDLoc(0) + conv_usize!(ldc_u32!(offset.try_into().unwrap())), + CILNode::LdcU8(byte), + ) + .into(), + ); + } + offset += 1; + } } } if !ptrs.is_empty() { diff --git a/src/binop/cmp.rs b/src/binop/cmp.rs index 840a12b8..e8829519 100644 --- a/src/binop/cmp.rs +++ b/src/binop/cmp.rs @@ -1,8 +1,8 @@ use cilly::{ - call, call_site::CallSite, cil_node::CILNode, eq, fn_sig::FnSig, gt, gt_un, lt, lt_un, - DotnetTypeRef, Type, + call, call_site::CallSite, cil_node::CILNode, cil_root::CILRoot, eq, fn_sig::FnSig, gt, gt_un, + lt, lt_un, ptr, DotnetTypeRef, Type, }; -use rustc_middle::ty::{IntTy, Ty, TyKind, UintTy}; +use rustc_middle::ty::{FloatTy, IntTy, Ty, TyKind, UintTy}; pub fn ne_unchecked(ty_a: Ty<'_>, operand_a: CILNode, operand_b: CILNode) -> CILNode { //vec![eq_unchecked(ty_a), CILOp::LdcI32(0), CILOp::Eq] @@ -35,9 +35,21 @@ pub fn eq_unchecked(ty_a: Ty<'_>, operand_a: CILNode, operand_b: CILNode) -> CIL ), _ => eq!(operand_a, operand_b), }, - TyKind::Bool | TyKind::Char | TyKind::Float(_) | TyKind::RawPtr(_, _) => { + TyKind::Bool + | TyKind::Char + | TyKind::Float(FloatTy::F32 | FloatTy::F64) + | TyKind::RawPtr(_, _) => { eq!(operand_a, operand_b) } + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__eqtf2".into(), + FnSig::new([Type::F128, Type::F128], Type::Bool), + true + ), + [operand_a, operand_b] + ), + _ => panic!("Can't eq type {ty_a:?}"), } } @@ -69,8 +81,18 @@ pub fn lt_unchecked(ty_a: Ty<'_>, operand_a: CILNode, operand_b: CILNode) -> CIL _ => lt!(operand_a, operand_b), }, // TODO: are chars considered signed or unsigned? - TyKind::Bool | TyKind::Char | TyKind::Float(_) => lt!(operand_a, operand_b), + TyKind::Bool | TyKind::Char | TyKind::Float(FloatTy::F32 | FloatTy::F64) => { + lt!(operand_a, operand_b) + } TyKind::RawPtr(_, _) | TyKind::FnPtr(_, _) => lt_un!(operand_a, operand_b), + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__lttf2".into(), + FnSig::new([Type::F128, Type::F128], Type::Bool), + true + ), + [operand_a, operand_b] + ), _ => panic!("Can't eq type {ty_a:?}"), } } @@ -101,7 +123,17 @@ pub fn gt_unchecked(ty_a: Ty<'_>, operand_a: CILNode, operand_b: CILNode) -> CIL _ => gt!(operand_a, operand_b), }, // TODO: are chars considered signed or unsigned? - TyKind::Bool | TyKind::Char | TyKind::Float(_) => gt!(operand_a, operand_b), + TyKind::Bool | TyKind::Char | TyKind::Float(FloatTy::F32 | FloatTy::F64) => { + gt!(operand_a, operand_b) + } + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__gttf2".into(), + FnSig::new([Type::F128, Type::F128], Type::Bool), + true + ), + [operand_a, operand_b] + ), TyKind::RawPtr(_, _) => gt_un!(operand_a, operand_b), _ => panic!("Can't eq type {ty_a:?}"), } diff --git a/src/binop/mod.rs b/src/binop/mod.rs index ac15aa10..539b1b5f 100644 --- a/src/binop/mod.rs +++ b/src/binop/mod.rs @@ -4,13 +4,13 @@ use bitop::{bit_and_unchecked, bit_or_unchecked, bit_xor_unchecked}; use cilly::{ call, call_site::CallSite, cil_node::CILNode, cil_root::CILRoot, conv_i8, conv_u16, conv_u32, conv_u64, conv_u8, div, eq, field_desc::FieldDescriptor, fn_sig::FnSig, gt_un, ld_false, lt_un, - rem, rem_un, size_of, sub, DotnetTypeRef, Type, + ptr, rem, rem_un, size_of, sub, DotnetTypeRef, Type, }; use cmp::{eq_unchecked, gt_unchecked, lt_unchecked, ne_unchecked}; use rustc_hir::lang_items::LangItem; use rustc_middle::{ mir::{BinOp, Operand}, - ty::{Instance, IntTy, List, ParamEnv, Ty, TyKind, UintTy}, + ty::{FloatTy, Instance, IntTy, List, ParamEnv, Ty, TyKind, UintTy}, }; use shift::{shl_checked, shl_unchecked, shr_checked, shr_unchecked}; @@ -66,12 +66,28 @@ pub(crate) fn binop<'tcx>( BinOp::Ge => match ty_a.kind() { // Unordered, to handle NaNs propely - TyKind::Float(_) => eq!(lt_un!(ops_a, ops_b), ld_false!()), + TyKind::Float(FloatTy::F32 | FloatTy::F64) => eq!(lt_un!(ops_a, ops_b), ld_false!()), + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__getf2".into(), + FnSig::new([Type::F128, Type::F128], Type::Bool), + true + ), + [ops_a, ops_b] + ), _ => eq!(lt_unchecked(ty_a, ops_a, ops_b), ld_false!()), }, BinOp::Le => match ty_a.kind() { // Unordered, to handle NaNs propely - TyKind::Float(_) => eq!(gt_un!(ops_a, ops_b), ld_false!()), + TyKind::Float(FloatTy::F32 | FloatTy::F64) => eq!(gt_un!(ops_a, ops_b), ld_false!()), + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__letf2".into(), + FnSig::new([Type::F128, Type::F128], Type::Bool), + true + ), + [ops_a, ops_b] + ), _ => eq!(gt_unchecked(ty_a, ops_a, ops_b), ld_false!()), }, BinOp::Offset => { @@ -166,7 +182,15 @@ pub fn add_unchecked<'tcx>( } } } - TyKind::Float(_) => ops_a + ops_b, + TyKind::Float(FloatTy::F32 | FloatTy::F64) => ops_a + ops_b, + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__addtf3".into(), + FnSig::new([Type::F128, Type::F128], Type::F128), + true + ), + [ops_a, ops_b,] + ), _ => todo!("can't add numbers of types {ty_a} and {ty_b}"), } } @@ -213,7 +237,15 @@ pub fn sub_unchecked<'tcx>( sub!(ops_a, ops_b) } } - TyKind::Float(_) => sub!(ops_a, ops_b), + TyKind::Float(FloatTy::F32 | FloatTy::F64) => sub!(ops_a, ops_b), + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__subtf3".into(), + FnSig::new([Type::F128, Type::F128], Type::F128), + true + ), + [ops_a, ops_b,] + ), _ => todo!("can't sub numbers of types {ty_a} and {ty_b}"), } } @@ -252,7 +284,17 @@ fn rem_unchecked<'tcx>( [ops_a, ops_b] ) } - TyKind::Int(_) | TyKind::Char | TyKind::Float(_) => rem!(ops_a, ops_b), + TyKind::Int(_) | TyKind::Char | TyKind::Float(FloatTy::F32 | FloatTy::F64) => { + rem!(ops_a, ops_b) + } + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "fmodl".into(), + FnSig::new([Type::F128, Type::F128], Type::F128), + true + ), + [ops_a, ops_b] + ), TyKind::Uint(_) => rem_un!(ops_a, ops_b), _ => todo!(), @@ -293,6 +335,14 @@ fn mul_unchecked<'tcx>( [operand_a, operand_b] ) } + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__multf3".into(), + FnSig::new([Type::F128, Type::F128], Type::F128), + true + ), + [operand_a, operand_b] + ), _ => operand_a * operand_b, } } @@ -331,7 +381,17 @@ fn div_unchecked<'tcx>( ) } TyKind::Uint(_) => CILNode::DivUn(operand_a.into(), operand_b.into()), - TyKind::Int(_) | TyKind::Char | TyKind::Float(_) => div!(operand_a, operand_b), + TyKind::Int(_) | TyKind::Char | TyKind::Float(FloatTy::F32 | FloatTy::F64) => { + div!(operand_a, operand_b) + } + TyKind::Float(FloatTy::F128) => call!( + CallSite::builtin( + "__divtf3".into(), + FnSig::new([Type::F128, Type::F128], Type::F128), + true + ), + [operand_a, operand_b] + ), _ => todo!(), } } diff --git a/src/compile_test.rs b/src/compile_test.rs index 962951b4..9a1550f7 100644 --- a/src/compile_test.rs +++ b/src/compile_test.rs @@ -731,6 +731,7 @@ run_test! {std,mutithreading,stable} run_test! {std,once_lock_test,unstable} run_test! {std,tlocal_key_test,stable} run_test! {types,adt_enum,stable} +run_test! {types,f128,stable} run_test! {types,aligned,stable} run_test! {types,any,stable} run_test! {types,arr,stable} diff --git a/src/constant.rs b/src/constant.rs index 16078147..5a7f62c9 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -315,7 +315,37 @@ fn load_const_float(value: u128, float_type: FloatTy, _tcx: TyCtxt) -> CILNode { let value = f64::from_ne_bytes((u64::try_from(value).unwrap()).to_ne_bytes()); CILNode::LdcF64(HashableF64(value)) } - FloatTy::F128 => todo!("Can't hanlde 128 bit floats yet!"), + FloatTy::F128 => { + // Int128 is used to emulate f128 + let low = u128_low_u64(value); + let high = (value >> 64) as u64; + let ctor_sig = FnSig::new( + &[ + Type::ManagedReference(Type::F128.into()), + Type::U64, + Type::U64, + ], + Type::Void, + ); + CILNode::TemporaryLocal(Box::new(( + Type::I128, + Box::new([CILRoot::SetTMPLocal { + value: CILNode::NewObj(Box::new(CallOpArgs { + site: CallSite::boxed( + Some(DotnetTypeRef::int_128()), + ".ctor".into(), + ctor_sig, + false, + ), + args: [conv_u64!(ldc_u64!(high)), conv_u64!(ldc_u64!(low))].into(), + })), + }]), + CILNode::LdObj { + ptr: Box::new(CILNode::LoadAddresOfTMPLocal.cast_ptr(ptr!(Type::F128))), + obj: Box::new(Type::F128), + }, + ))) + } } } pub fn load_const_int(value: u128, int_type: IntTy) -> CILNode { @@ -348,7 +378,7 @@ pub fn load_const_int(value: u128, int_type: IntTy) -> CILNode { let high = (value >> 64) as u64; let ctor_sig = FnSig::new( &[ - Type::ManagedReference(Type::U128.into()), + Type::ManagedReference(Type::I128.into()), Type::U64, Type::U64, ], diff --git a/src/lib.rs b/src/lib.rs index 947873a5..d484487d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -267,7 +267,8 @@ impl CodegenBackend for MyBackend { let mut asm_out = std::fs::File::create(&serialized_asm_path).expect( "Could not create the temporary files necessary for building the assembly!", ); - let v2 = cilly::v2::Assembly::from_v1(&asm); + let mut v2 = cilly::v2::Assembly::from_v1(&asm); + v2.opt(&mut v2.fuel_from_env()); asm_out .write_all( &postcard::to_stdvec(&v2).expect("Could not serialize the tmp assembly file!"), diff --git a/src/place/mod.rs b/src/place/mod.rs index 98f891e7..d94862ff 100644 --- a/src/place/mod.rs +++ b/src/place/mod.rs @@ -100,7 +100,10 @@ pub fn deref_op<'tcx>( }, FloatTy::F32 => CILNode::LDIndF32 { ptr }, FloatTy::F64 => CILNode::LDIndF64 { ptr }, - FloatTy::F128 => todo!("Can't 128 bit floats yet!"), + FloatTy::F128 => CILNode::LdObj { + ptr, + obj: Box::new(Type::F128), + }, }, TyKind::Bool => CILNode::LDIndBool { ptr }, // Both Rust bool and a managed bool are 1 byte wide. .NET bools are 4 byte wide only in the context of Marshaling/PInvoke, // due to historic reasons(BOOL was an alias for int in early Windows, and it stayed this way.) - FractalFir diff --git a/src/type/mod.rs b/src/type/mod.rs index 7cb077ef..904775a0 100644 --- a/src/type/mod.rs +++ b/src/type/mod.rs @@ -40,6 +40,6 @@ pub fn from_float(float: &FloatTy) -> Type { FloatTy::F16 => Type::F16, FloatTy::F32 => Type::F32, FloatTy::F64 => Type::F64, - FloatTy::F128 => todo!("Can't hanlde 128 bit floats yet!"), + FloatTy::F128 => Type::F128, } } diff --git a/src/type/tycache.rs b/src/type/tycache.rs index 80165397..7d15940b 100644 --- a/src/type/tycache.rs +++ b/src/type/tycache.rs @@ -26,6 +26,20 @@ impl TyCache { type_def_cache: FxHashMap::with_hasher(FxBuildHasher::default()), cycle_prevention: vec![], }; + new.type_def_cache.insert( + "f128".into(), + TypeDef::new( + AccessModifer::Extern, + "f128".into(), + vec![], + vec![("low".into(), Type::U64), ("high".into(), Type::U64)], + vec![], + Some(vec![0, 8]), + 0, + None, + Some(NonZeroU32::new(std::mem::size_of::().try_into().unwrap()).unwrap()), + ), + ); new.add_arr(Type::USize, 4, 32); new } diff --git a/test/types/f128.rs b/test/types/f128.rs new file mode 100644 index 00000000..4cab4c1d --- /dev/null +++ b/test/types/f128.rs @@ -0,0 +1,28 @@ +#![feature( + lang_items, + associated_type_defaults, + core_intrinsics, + start, + unsized_const_params, + f128 +)] +#![allow(internal_features, incomplete_features, unused_variables, dead_code)] +#![no_std] +include!("../common.rs"); +#[inline(never)] +#[no_mangle] + +fn main() { + // 1st. Check that a const f128 can be created. + let zero = black_box(0_f128); + let one = black_box(0_f128); + let two = black_box(0_f128); + // Check that addtion works + test_eq!(black_box(one + one), two); + // Check that subtraction works + test_eq!(black_box(one - one), zero); + // Check that multiplaction works + test_eq!(black_box(one * one), one); + // Check that division works + test_eq!(black_box(two / one), two); +}