[dependencies]
stderr = "0.8.0"
bench_timer = "0.1.1"
or
[dependencies]
stderr = "0.8.0"
bench_timer = { git = "https://github.com/biluohc/bench_timer", branch = "master", version = "0.1.1"}
#[macro_use]
extern crate stderr;
#[macro_use]
extern crate bench_timer;
fn main() {
let msg = std::env::args()
.skip(1)
.next()
.unwrap_or_else(|| "fuck u".to_owned());
timer_sort!(3,
100000,
to_owed(),
new(),
default(),
format(),
insert_e(&msg),
push_str(&msg),
format_s(&msg),
insert_0(&msg),
mul_args_add(&msg, ": cargo"),
mul_args_like_push_str(&msg, ": cargo")
);
}
#[inline(always)]
fn to_owed() {
let s = "".to_owned();
dbln!("{}", s);
}
#[inline(always)]
fn new() {
let s = String::new();
dbln!("{}", s);
}
#[inline(always)]
fn default() {
let s = String::default();
dbln!("{}", s);
}
#[inline(always)]
fn format() {
let s = format!("{}", "");
dbln!("{}", s);
}
#[inline(always)]
fn push_str(msg: &str) {
let mut s = msg.to_owned();
s.push_str(": cargo");
dbln!("{}", s);
}
#[inline(always)]
fn format_s(msg: &str) {
let s = format!("{}: cargo", msg);
dbln!("{}", s);
}
#[inline(always)]
fn insert_0(msg: &str) {
let mut s = ": cargo".to_owned();
s.insert_str(0, msg);
dbln!("{}", s);
}
#[inline(always)]
fn insert_e(msg: &str) {
let mut s = ": cargo".to_owned();
let len = s.len();
s.insert_str(len, msg);
dbln!("{}", s);
}
#[inline(always)]
fn mul_args_add(msg0: &str, msg1: &str) {
let s = msg0.to_owned() + msg1;
dbln!("{}", s);
}
#[inline(always)]
fn mul_args_like_push_str(msg0: &str, msg1: &str) {
let mut s = msg0.to_owned();
s.push_str(msg1);
dbln!("{}", s);
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.