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
<div zn-pages zn-pages-start="0" zn-pages-swipe> | |
<ul zn-pages-start="1"> | |
<li style="background-color: #1abc9c; width: 250px">Pages</li> | |
<li style="background-color: #3498db">Main</li> | |
</ul> | |
<ul zn-pages-start="1"> | |
<li ng-repeat="val in colors track by $id($index)" style="background-color: {{ val }}; text-align: center; margin: 0 auto">{{ val }}</li> | |
</ul> | |
<ul> | |
<li style="background-color: #95a5a6">Credits</li> |
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 container = znPageManager.container('zn-pages-container-0'); | |
// or znPageManager.containers()[0] | |
$scope.slideLeft = function() { container.slideLeft(); }; | |
$scope.slideRight = function() { container.slideRight(); }; | |
$scope.slideDown = function() { container.slideDown(); }; | |
$scope.slideUp = function() { container.slideUp(); }; | |
$scope.slideHome = function() { container.slideHome(); }; |
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
/* | |
* Based on algorithm given at http://freespace.virgin.net/hugo.elias/models/m_perlin.htm | |
* | |
* Borrowed heavily from https://github.com/iand/perlin/blob/master/perlin.go | |
* | |
* MIT License http://opensource.org/licenses/MIT | |
*/ | |
package main |
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
Command: go test -bench=. | |
Machine: Macbook Air 10.8.4 1.8GHz Intel Core i5 4GB 1600MHz DDR3 | |
BSON (message size = 152) | |
---- | |
BenchmarkMarhsal 200000 6638 ns/op | |
BenchmarkUnmarshall 200000 9599 ns/op | |
MsgPack (message size = 126) |
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
Testing fnv.New64() with size 235886 | |
m = 3391472, n = 235886, k = 10, s = 339148, p = 0.500000, e = 0.001000 | |
Total items: 235886 | |
Bits in partition 0: 170044 (50.1%) | |
Bits in partition 1: 170171 (50.2%) | |
Bits in partition 2: 169914 (50.1%) | |
Bits in partition 3: 170022 (50.1%) | |
Bits in partition 4: 170144 (50.2%) | |
Bits in partition 5: 169979 (50.1%) | |
Bits in partition 6: 170080 (50.1%) |
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
Partitioned Bloom Filter | |
------------------------ | |
BenchmarkBloomFNV64 1000000 1032 ns/op | |
BenchmarkBloomCRC64 1000000 1032 ns/op | |
BenchmarkBloomMurmur3 1000000 1008 ns/op (ignore, invalid due to murmur3 impl or incorrect usage) | |
BenchmarkBloomCityHash 1000000 3345 ns/op (ignore, most likely slow due to my cityhash impl) | |
BenchmarkBloomMD5 1000000 2349 ns/op | |
BenchmarkBloomSha1 1000000 2551 ns/op | |
Standard Bloom Filter |
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
# h = operations | |
# i = # of bits for bitmap 1 | |
# j = # of bits for bitmap 2 | |
# k = random distance between bits for bitmap 1 (0-k) - indicates sparsity | |
# l = random distance between bits for bitmap 1 (0-l) - indicates sparsity | |
for h in and or xor andnot | |
do | |
for i in 100 10000 1000000 | |
do | |
for j in 100 10000 1000000 |
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
package codesearch | |
import ( | |
"bufio" | |
"compress/gzip" | |
"encoding/binary" | |
"fmt" | |
"github.com/reducedb/cityhash" | |
"log" | |
"os" |
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
--- Output of using **gccgo -O3** --- | |
BenchmarkOffset2 50000000 27.6 ns/op | |
BenchmarkOffset 50000000 32.0 ns/op | |
BenchmarkRange 500000000 4.46 ns/op | |
BenchmarkUnrolled 200000000 8.92 ns/op | |
BenchmarkCopy 500000000 7.52 ns/op | |
BenchmarkRangeCopy 100000000 13.9 ns/op | |
BenchmarkCopyUnrolled 200000000 8.91 ns/op | |
--- Output of using standard go compiler --- |
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
package main | |
import ( | |
"bytes" | |
"code.google.com/p/snappy-go/snappy" | |
"github.com/cznic/zappy" | |
"compress/gzip" | |
"compress/lzw" | |
"flag" | |
"fmt" |
OlderNewer