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" | |
type S struct { | |
I int | |
} | |
func main() { | |
m1 := map[string]S{"0": S{0}, "1": S{1}} |
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" | |
. "net/http" | |
) | |
const ADDRESS = ":1024" | |
const SECURE_ADDRESS = ":1025" | |
func main() { |
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" | |
. "net/http" | |
) | |
const ADDRESS = ":1024" | |
const SECURE_ADDRESS = ":1025" | |
func main() { |
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
benchmark old ns/op new ns/op delta | |
BenchmarkBaselineCastInt32ToInt 0 0 -0.00% | |
BenchmarkBaselineCastIntToInt32 0 0 +0.00% | |
BenchmarkBaselineCastInt64ToUint64 0 0 +8.82% | |
BenchmarkBaselineCastUint64ToInt64 0 0 -0.00% | |
BenchmarkBaselineVariableGet 0 0 -0.00% | |
BenchmarkBaselineVariableSet 0 0 +2.94% | |
BenchmarkBaselineVariableGetInterface 0 0 -0.00% | |
BenchmarkBaselineVariableSetInterface 10 0 -93.37% | |
BenchmarkBaselineVariableIncrement 2 1 -0.50% |
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
eleanor$ go test -test.bench="Benchmark" github.com/feyeleanor/gospeed | |
PASS | |
BenchmarkBaselineCastInt32ToInt 2000000000 0.34 ns/op | |
BenchmarkBaselineCastIntToInt32 2000000000 0.35 ns/op | |
BenchmarkBaselineCastInt64ToUint64 2000000000 0.37 ns/op | |
BenchmarkBaselineCastUint64ToInt64 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableGet 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableSet 2000000000 0.35 ns/op | |
BenchmarkBaselineVariableGetInterface 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableSetInterface 2000000000 0.69 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
bash-3.2# go test -test.bench="Benchmark" github.com/feyeleanor/gospeed | |
PASS | |
BenchmarkBaselineCastInt32ToInt 2000000000 0.37 ns/op | |
BenchmarkBaselineCastIntToInt32 2000000000 0.34 ns/op | |
BenchmarkBaselineCastInt64ToUint64 2000000000 0.34 ns/op | |
BenchmarkBaselineCastUint64ToInt64 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableGet 2000000000 0.35 ns/op | |
BenchmarkBaselineVariableSet 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableGetInterface 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableSetInterface 2000000000 0.68 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
bash-3.2# go test -test.bench="Benchmark" github.com/feyeleanor/gospeed | |
PASS | |
BenchmarkBaselineCastInt32ToInt 2000000000 0.34 ns/op | |
BenchmarkBaselineCastIntToInt32 2000000000 0.35 ns/op | |
BenchmarkBaselineCastInt64ToUint64 2000000000 0.34 ns/op | |
BenchmarkBaselineCastUint64ToInt64 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableGet 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableSet 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableGetInterface 2000000000 0.34 ns/op | |
BenchmarkBaselineVariableSetInterface 100000000 10.4 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
BenchmarkBaselineCastInt32ToInt 2000000000 0.33 ns/op | |
BenchmarkBaselineCastIntToInt32 2000000000 0.33 ns/op | |
BenchmarkBaselineCastInt64ToUint64 2000000000 0.33 ns/op | |
BenchmarkBaselineCastUint64ToInt64 2000000000 0.33 ns/op | |
BenchmarkBaselineVariableGet 2000000000 0.33 ns/op | |
BenchmarkBaselineVariableSet 2000000000 0.33 ns/op | |
BenchmarkBaselineVariableGetInterface 2000000000 0.33 ns/op | |
BenchmarkBaselineVariableSetInterface 100000000 34.6 ns/op | |
BenchmarkBaselineVariableIncrement 2000000000 1.98 ns/op | |
BenchmarkBaselineVariableDecrement 2000000000 1.98 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
require 'rubygems' | |
require 'dnsruby' | |
include Dnsruby | |
$nameserver = Resolver.new | |
def dig domain, rrtype | |
search = $nameserver.query(domain, Types.send(rrtype)) | |
if rrtype == :NAPTR | |
search.answer.sort_by { |a| [ a.order, a.preference ] }.each { |rr| |
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
root@raspberrypi:/usr/local/go/src/pkg/github.com/feyeleanor/gospeed# go test -test.bench=".*" | |
PASS | |
BenchmarkBaselineCastInt32ToInt 100000000 13.4 ns/op | |
BenchmarkBaselineCastIntToInt32 100000000 14.1 ns/op | |
BenchmarkBaselineCastInt64ToUint64 100000000 18.0 ns/op | |
BenchmarkBaselineCastUint64ToInt64 100000000 17.2 ns/op | |
BenchmarkBaselineVariableGet 100000000 14.2 ns/op | |
BenchmarkBaselineVariableSet 100000000 23.0 ns/op | |
BenchmarkBaselineVariableGetInterface 100000000 13.4 ns/op | |
BenchmarkBaselineVariableSetInterface 50000000 32.7 ns/op |
NewerOlder