=== RUN TestRaw
--- PASS: TestRaw (0.00s)
BenchmarkStrconv-8 30000000 44.1 ns/op 7 B/op 1 allocs/op
BenchmarkFmt-8 10000000 127 ns/op 16 B/op 2 allocs/op
BenchmarkRaw-8 50000000 30.0 ns/op 7 B/op 1 allocs/op
PASS
ok command-line-arguments 4.298s
This file contains hidden or 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
| #include <stdio.h> | |
| #include <complex.h> | |
| int main(){ | |
| complex double x = 3 + 4 * I; | |
| printf("x: %.3lf %.3lf\n", creal(x), cimag(x)); | |
| return 0; | |
| } |
This file contains hidden or 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
| nik@nik-msi@01:24:41:plutos$ echo "we need to go deeper" | cowthink -n -f sodomized-sheep | cowthink -w -n -f head-in | cowthink -n -f flaming-sheep | cowthink -n -f tux | |
| _________________________________________ | |
| ( _____________________________________ ) | |
| ( ( ____________________________ ) ) | |
| ( ( ( ______________________ ) ) ) | |
| ( ( ( ( we need to go deeper ) ) ) ) | |
| ( ( ( ---------------------- ) ) ) | |
| ( ( ( o __ ) ) ) | |
| ( ( ( o (oo) ) ) ) | |
| ( ( ( o ( ) ) ) ) |
This file contains hidden or 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
| /* | |
| This is example of strange goleveldb behaviour | |
| Run as this: | |
| $ cd $GOPATH/src/github.com/syndtr/goleveldb && git log --max-count=1 --pretty=oneline | |
| 6b4daa5362b502898ddf367c5c11deb9e7a5c727 all: fix documentation | |
| $ go version | |
| go version go1.8beta1 linux/amd64 | |
| $ go run ~/leveldb.go -sizecheck 1s -N 5000000 -path /tmp/ram/test_1 -op gen | |
| 2016/12/15 18:53:18 db size 8.5 kB. current i (keys passed): 0 |
This file contains hidden or 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
| func BenchmarckFuncA(b *testing.B) { | |
| var res int | |
| for i := 0; i < b.N; i++ { | |
| res = funcA(i) | |
| } | |
| _ = res | |
| } |
This file contains hidden or 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
| package main | |
| import ( | |
| "time" | |
| ) | |
| func main() { | |
| tick := time.NewTicker(time.Second / 10) | |
| defer tick.Stop() | |
| for { |
This file contains hidden or 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
| package main | |
| import ( | |
| "io/ioutil" | |
| "os" | |
| "testing" | |
| "github.com/dgraph-io/badger" | |
| "github.com/dgraph-io/badger/options" | |
| "github.com/stretchr/testify/assert" |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "math/rand" | |
| "time" | |
| ) | |
| type ( |
This file contains hidden or 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
| type Node struct { | |
| p net.PacketConn | |
| stopc chan struct{} | |
| } | |
| func (n *Node) listener() (err error) { | |
| var buf [0x10000]byte | |
| for { |
This file contains hidden or 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
| # results of https://github.com/nikandfor/fifo/blob/79666f84bc24cfcf939a3eb7179219b6114851b8/slice_vs_sll_test.go | |
| % gotip test -bench . | |
| goos: darwin | |
| goarch: arm64 | |
| pkg: github.com/nikandfor/fifo | |
| BenchmarkFIFOPush-8 340634864 3.141 ns/op 12 B/op 0 allocs/op | |
| BenchmarkFIFOPop-8 142949896 10.79 ns/op 0 B/op 0 allocs/op | |
| BenchmarkFIFO10Cycles-8 10714357 116.7 ns/op 75 B/op 0 allocs/op | |
| BenchmarkQueueSlicePush-8 261353589 5.114 ns/op 42 B/op 0 allocs/op |
OlderNewer