Skip to content

Instantly share code, notes, and snippets.

κeen KeenS

Block or report user

Report or block KeenS

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@KeenS
KeenS / qsort.smi
Last active Jan 3, 2020
An example of SML#'s MassiveThreads support
View qsort.smi
_require "basis.smi"
_require "thread.smi"
@KeenS
KeenS / memo.txt
Last active Dec 21, 2019
Rustの並列コンパイラを試してみた See also https://qiita.com/qnighy/items/b0aa66749ad7a31ecbf9
View memo.txt
手元のコード(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
View Hamt.sml
functor Hamt(X:
sig
eqtype k
val hash: k -> Int32.int
end
): sig
type 'v t
exception HashConflict
val empty: 'v t
View struct_index.rs
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 {
View main.saty
@require: stdjareport
@import: stage0
let-inline \show-int n = embed-string (arabic n)
in
document (|
title = {サンプル文書};
author = {組 版太郎};
|) '<
View cps
[| 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))>
View tayupinco.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View rust_by_example.rb
# 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 }
View console.log
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
View sytax.rs
//! parent level doc comments
mod path {
/*! parent level doc comment2 */
pub mod name {
pub type Type = String;
pub const CONSTANT: &'static str = "const";
}
}
You can’t perform that action at this time.