$ benchcmp old.txt new.txt
benchmark old ns/op new ns/op delta
BenchmarkBy*-4 319 99.4 -68.84%
BenchmarkBy*-4 318 138 -56.60%
BenchmarkBy*-4 321 88.7 -72.37%
BenchmarkBy*-4 320 90.2 -71.81%
BenchmarkBy*-4 319 85.9 -73.07%
benchmark old allocs new allocs delta
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 "testing" | |
var len8tab = [256]uint8{ | |
0x00, 0x01, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | |
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | |
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, | |
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, | |
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, |
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
BenchmarkWrite1B-4 100000000 11.4 ns/op 2 B/op 0 allocs/op | |
BenchmarkWrite1B-4 100000000 10.5 ns/op 2 B/op 0 allocs/op | |
BenchmarkWrite1B-4 100000000 10.7 ns/op 2 B/op 0 allocs/op | |
BenchmarkWrite1B-4 100000000 11.8 ns/op 2 B/op 0 allocs/op | |
BenchmarkWrite1B-4 100000000 11.5 ns/op 2 B/op 0 allocs/op | |
BenchmarkWrite10B-4 100000000 27.5 ns/op 24 B/op 0 allocs/op | |
BenchmarkWrite10B-4 100000000 14.0 ns/op 24 B/op 0 allocs/op | |
BenchmarkWrite10B-4 100000000 13.5 ns/op 24 B/op 0 allocs/op | |
BenchmarkWrite10B-4 100000000 13.8 ns/op 24 B/op 0 allocs/op | |
BenchmarkWrite10B-4 100000000 13.5 ns/op 24 B/op 0 allocs/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
BenchmarkSetDelete-4 500 4017796 ns/op 6318207 B/op 251 allocs/op | |
BenchmarkSetDelete-4 20 50002573 ns/op 5196896 B/op 237 allocs/op | |
BenchmarkSetDelete-4 500 4189012 ns/op 6318139 B/op 251 allocs/op | |
BenchmarkSetDelete-4 500 4028421 ns/op 6319832 B/op 251 allocs/op | |
BenchmarkSetDelete-4 300 3419728 ns/op 6076823 B/op 250 allocs/op | |
BenchmarkSetDelete-4 500 2828081 ns/op 6318151 B/op 251 allocs/op | |
BenchmarkSetDelete-4 1000 3638473 ns/op 6217322 B/op 251 allocs/op | |
BenchmarkSetDelete-4 500 3446303 ns/op 6319831 B/op 251 allocs/op | |
BenchmarkSetDelete-4 1000 3779531 ns/op 6218172 B/op 252 allocs/op | |
BenchmarkSetDelete-4 500 3234770 ns/op 6318151 B/op 251 allocs/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
diff --git a/src/database/sql/convert.go b/src/database/sql/convert.go | |
index b79ec3f..bb384a9 100644 | |
--- a/src/database/sql/convert.go | |
+++ b/src/database/sql/convert.go | |
@@ -402,11 +402,15 @@ func convertAssign(dest, src interface{}) error { | |
dv.SetUint(u64) | |
return nil | |
case reflect.Float32, reflect.Float64: | |
- s := asString(src) | |
- f64, err := strconv.ParseFloat(s, dv.Type().Bits()) |
go get -u github.com/orijtech/coinbase/v2
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 ( | |
"flag" | |
"fmt" | |
"log" | |
"net" | |
"net/http" | |
"net/http/httputil" | |
"net/url" |
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 ( | |
"sync" | |
"testing" | |
) | |
type st struct { | |
sync.Mutex |
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 ( | |
"math/big" | |
"testing" | |
) | |
var bns = []*big.Int{ | |
big.NewInt(0), | |
big.NewInt(10), |