This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Put this into Cargo.toml and the below code under benches/bench.rs: | |
[package] | |
name = "startbench" | |
version = "0.1.0" | |
edition = "2021" | |
[[bench]] | |
name = "bench" | |
harness = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home/andre/projects/this-week-in-rust | |
COMMAND="$1" | |
case "${COMMAND}" in | |
start) | |
git checkout master | |
git pull origin master | |
FILE=draft*/*.md | |
set $(head -n 2 ${FILE} | tail -n 1) | |
NUMBER="$2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::arch::x86_64::*; | |
#[derive(Copy, Clone, Debug)] | |
pub struct u8x16(__m128i); | |
impl Default for u8x16 { | |
fn default() -> Self { u8x16(unsafe { _mm_setzero_si128() }) } | |
} | |
impl u8x16 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling ai2048 v0.1.0 (file:///home/andre/projects/ai2048) | |
warning: you should put `ExpectiMax` between ticks in the documentation, #[warn(doc_markdown)] on by default | |
--> src/searcher.rs:1:64 | |
|> | |
1 |> //! This is the meat of the library. This module implements an ExpectiMax search | |
|> ^^^^^^^^^^ | |
help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#doc_markdown | |
warning: you should put `Expectiminimax_tree` between ticks in the documentation, #[warn(doc_markdown)] on by default | |
--> src/searcher.rs:2:36 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Computer Language Benchmarks Game | |
// http://benchmarksgame.alioth.debian.org/ | |
// | |
// contributed by the Rust Project Developers | |
// contributed by TeXitoi | |
// contributed by BurntSushi | |
extern crate regex; | |
use regex::bytes::Regex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i=1 | |
(1..(args[0] as int)).each{i*=it} | |
print i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class D{public static void main(String[]a){for(int i=1;i<366;i+=7){System.out.println(new java.util.Date(116,0,i));}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class G{public static void main(String[]r){for(long a=0,b=1,i=0,c;i++<50;){c=a;a+=b;b=c;System.out.println(a);}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class F{public static void main(String[]r){int a=1,i=1;for(;i<=new Integer(r[0]);i++){a*=i;}System.out.print(a);}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Computer Language Benchmarks Game | |
// http://benchmarksgame.alioth.debian.org/ | |
// | |
// contributed by llogiq | |
// | |
// built on top of Joshua Landau's fasta | |
// built on top of Rust versions | |
// contributed by the Rust Project Developers | |
// contributed by TeXitoi | |
// multi-threaded version contributed by Alisdair Owens |
NewerOlder