on Mac Book Air (OSX 10.7.5) 1.6 GHz Intel Core i5 Memory 4GB
$ go test -bench .
PASS
BenchmarkClosure 100000000 11.5 ns/op
BenchmarkMutexClosure 50000000 35.3 ns/op
BenchmarkAtomicClosure 100000000 17.8 ns/opon Mac Book Air (OSX 10.7.5) 1.6 GHz Intel Core i5 Memory 4GB
$ go test -bench .
PASS
BenchmarkClosure 100000000 11.5 ns/op
BenchmarkMutexClosure 50000000 35.3 ns/op
BenchmarkAtomicClosure 100000000 17.8 ns/op| package main | |
| import ( | |
| "log" | |
| "runtime" | |
| "sync" | |
| ) | |
| var debug func(a ...interface{}) |
| b.txt |
| function* generator() { | |
| console.log(yield 1); | |
| console.log(yield 2); | |
| console.log(yield 3); | |
| return 4; | |
| } | |
| var g = generator(); | |
| console.log(g.next(0)); // この 0 を取る方法は? | |
| console.log(g.next(10)); |
| import sys, socket | |
| ''' | |
| tcp fast open server sample code | |
| execute it before enable tfo flag | |
| $ echo 3 | sudo tee /proc/sys/net/ipv4/tcp_fastopen | |
| ''' | |
| PORT = 80 | |
| MSG_FASTOPEN = 0x20000000 |
| 全て Without Indexing で送るパターン | |
| HT を更新しない。 | |
| 結果的には :scheme, :method くらいしか使いまわさないパターン。 | |
| [1] | |
| HeaderSet | |
| :scheme: https | |
| :host: jxck.io |
| .DS_Store |
| package main | |
| /* | |
| Go のインタフェース設計 | |
| 参考 | |
| https://code.google.com/p/go-wiki/wiki/GoForCPPProgrammers | |
| http://jordanorelli.tumblr.com/post/32665860244/how-to-use-interfaces-in-go | |
| http://research.swtch.com/interfaces | |
| http://www.airs.com/blog/archives/277 |
Tokyo, Japan January 30-February 1, 2013
| node_modules |