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
手元のコード(4万行くらい)をThreadripper 1950x(16コア32スレッド)でビルドしてみた | |
# 並列化してないやつ | |
cargo +nightly-2019-12-17 build 882.25s user 49.92s system 468% cpu 3:19.16 total | |
cargo +nightly-2019-12-17 build --release 2988.11s user 52.70s system 1149% cpu 4:24.54 total | |
cargo +nightly-2019-12-17 check 199.58s user 14.22s system 413% cpu 51.731 total | |
# 並列化したやつ | |
cargo +nightly-2019-12-18 build 1061.89s user 75.08s system 618% cpu 3:03.70 total | |
cargo +nightly-2019-12-18 build --release 3135.03s user 74.32s system 1247% cpu 4:17.21 total |
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
functor Hamt(X: | |
sig | |
eqtype k | |
val hash: k -> Int32.int | |
end | |
): sig | |
type 'v t | |
exception HashConflict | |
val empty: 'v t |
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::ops::{Index, IndexMut}; | |
pub struct User { | |
id: u64, | |
name: String, | |
} | |
impl User { | |
pub fn new(id_var: u64, name_var: String) -> Self { | |
User { |
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
@require: stdjareport | |
@import: stage0 | |
let-inline \show-int n = embed-string (arabic n) | |
in | |
document (| | |
title = {サンプル文書}; | |
author = {組 版太郎}; | |
|) '< |
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
[| x |] = λk.k x ・・・val | |
[| λx.t |] = λk.k (λx.[|t|]) ・・・lam | |
[| π t |] = λk.[|t|] (λa.k (π a)) ・・・app1 | |
[| t1 t2 |] = λk.[|t1|] (λf.[|t2|] (λa.f a k)) ・・・app2 | |
[| Sx.t |] = λk.[x↦λa.λk'.k' (k a)]([|t|] (λv.v))・・・shift | |
[| <t> |] = λk.k ([|t|] (λv.v)) ・・・reset | |
変換対象: <add10 (Sx.x (x 100))> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# coding: utf-8 | |
var = [ | |
{ "id": "hello", "title": "Hello World", "children": [ | |
{ "id": "comment", "title": "コメント", "children": nil }, | |
{ "id": "print", "title": "フォーマットしてプリント", "children": [ | |
{ "id": "print_debug", "title": "デバッグ", "children": nil }, | |
{ "id": "print_display", "title": "ディスプレイ", "children": [ | |
{ "id": "testcase_list", "title": "テストケース: リスト", "children": nil } | |
] }, | |
{ "id": "fmt", "title": "フォーマット", "children": nil } |
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
running 3 tests | |
test bench::benth_fib_memo1 ... bench: 5,237 ns/iter (+/- 411) | |
test bench::benth_fib_memo1_2 ... bench: 2 ns/iter (+/- 0) | |
test bench::benth_fib_memo2 ... bench: 2 ns/iter (+/- 0) | |
test result: ok. 0 passed; 0 failed; 0 ignored; 3 measured; 0 filtered out |
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
//! parent level doc comments | |
mod path { | |
/*! parent level doc comment2 */ | |
pub mod name { | |
pub type Type = String; | |
pub const CONSTANT: &'static str = "const"; | |
} | |
} |
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
struct DbConn; | |
#[derive(Clone, Copy)] | |
struct User; | |
#[derive(Clone, Copy)] | |
struct Device; | |
enum Error { | |
ReadPrivilege, | |
WritePrivilege, |