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
var sys = require('sys'), | |
require("./date/globalization/en-GB"); | |
require("./date/core"); | |
require("./date/parser"); | |
require("./date/sugarpak"); | |
require("./date/time"); | |
require("./date/extras"); | |
var start = new Date(); |
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
#!/usr/bin/python | |
import atexit | |
import csv | |
import os | |
import glob | |
import time | |
import heapq | |
from struct import Struct | |
from array import array | |
from kyotocabinet import * |
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
$g++ vector_map.cpp -o vector_test && ./vector_test | |
Vector with x: 645 y: 413 z: 958 has value: 1312704908 | |
Vector with x: 496 y: 358 z: 749 has value: 1988979514 | |
Vector with x: 223 y: 868 z: 203 has value: 141221503 | |
Vector with x: 345 y: 350 z: 869 has value: 1678149073 | |
Vector with x: 565 y: 366 z: 722 has value: 1934444366 | |
Vector with x: 934 y: 419 z: 619 has value: 560261625 | |
Vector with x: 426 y: 92 z: 351 has value: 427818382 | |
Vector with x: 24 y: 263 z: 407 has value: 760253072 | |
... |
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
{ | |
"success" : true, | |
"documents" :{ | |
"metaData" :{ | |
"fields" : ["characters","docid","doctype","fragment_count","group","title"] | |
}, | |
"rows" :[ | |
{ | |
"fragments" : [[93,11,36,450491776]], | |
"characters": 993759, |
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
<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 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 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 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 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 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 |
OlderNewer