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
| go test -bench=. | |
| PASS | |
| BenchmarkSortString1K 5000 386508 ns/op | |
| BenchmarkSortInt1K 10000 194999 ns/op | |
| BenchmarkSortInt64K 100 19355025 ns/op | |
| ok _/usr/local/code/timsort 9.003s | |
| go test -run=TestSortBM | |
| PASS | |
| ok _/usr/local/code/timsort 0.607s |
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
| go test -bench=.* | |
| testing: warning: no tests to run | |
| PASS | |
| BenchmarkSort 5000000 707 ns/op | |
| BenchmarkShellSort 5000000 603 ns/op |
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
| go tool 6g -S test.go | |
| --- prog list "InvertedSlice.Len" --- | |
| 0000 (test.go:17) TEXT InvertedSlice.Len+0(SB),$0-32 | |
| 0001 (test.go:17) MOVQ s+8(FP),BX | |
| 0002 (test.go:17) MOVQ BX,.noname+24(FP) | |
| 0003 (test.go:17) RET , | |
| --- prog list "InvertedSlice.Swap" --- | |
| 0004 (test.go:18) TEXT InvertedSlice.Swap+0(SB),$0-40 |
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
| To benchmark: | |
| go test -bench=".*" > machine_description.txt |
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
| --- a/src/pkg/testing/testing.go Sun Dec 30 12:01:53 2012 -0500 | |
| +++ b/src/pkg/testing/testing.go Mon Jan 07 11:43:25 2013 +0000 | |
| @@ -91,6 +91,7 @@ | |
| "strings" | |
| "sync" | |
| "time" | |
| + "unicode/utf8" | |
| ) | |
| var ( |
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
| $ go version && go run test.go | |
| go version devel +87f67aadaed6 Sat Dec 22 17:41:00 2012 -0800 darwin/amd64 | |
| Test1: 0 | |
| Test1: 0 | |
| Test1: 0 | |
| Test1: 0 | |
| Test1: 0 | |
| Test1: 0 | |
| Test1: 0 | |
| Test1: 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
| go test sum -v -benchtime=0.1s | |
| === RUN TestSmallSumBytes | |
| --- PASS: TestSmallSumBytes (0.00 seconds) | |
| === RUN TestSumBytes | |
| --- PASS: TestSumBytes (2.52 seconds) | |
| === RUN TestBenchmark | |
| --- PASS: TestBenchmark (10.96 seconds) | |
| sum_test.go:75: Benchmark Results | |
| Length: 0 Fast: 5.42 ns/op Slow: 4.93 ns/op Improvement -9.03% | |
| Length: 1 Fast: 7.56 ns/op Slow: 5.26 ns/op Improvement -30.39% |
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
| $ gcc dht.cc -lstdc++ -o dht && ./dht | |
| PASS | |
| PASS | |
| PASS | |
| PASS | |
| PASS | |
| PASS | |
| PASS |
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
| <html> | |
| <head> | |
| <title>Streamgraph</title> | |
| <script type="text/javascript" src="http://vis.stanford.edu/protovis/protovis-r3.2.js"></script> | |
| <script type="text/javascript" src="stream.js"></script> | |
| <style type="text/css"> | |
| body { | |
| margin: 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
| { | |
| "success" : true, | |
| "documents" :{ | |
| "metaData" :{ | |
| "fields" : ["characters","docid","doctype","fragment_count","group","title"] | |
| }, | |
| "rows" :[ | |
| { | |
| "fragments" : [[93,11,36,450491776]], | |
| "characters": 993759, |