replace all ocurrences of encoding/json with json-iterator so we get rid of HTML escaping and hopefully get faster too.
This commit is contained in:
@@ -6,12 +6,16 @@ import (
|
||||
"sync"
|
||||
"unsafe"
|
||||
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"golang.org/x/exp/constraints"
|
||||
)
|
||||
|
||||
const MAX_LOCKS = 50
|
||||
|
||||
var namedMutexPool = make([]sync.Mutex, MAX_LOCKS)
|
||||
var (
|
||||
namedMutexPool = make([]sync.Mutex, MAX_LOCKS)
|
||||
json = jsoniter.ConfigFastest
|
||||
)
|
||||
|
||||
//go:noescape
|
||||
//go:linkname memhash runtime.memhash
|
||||
|
||||
Reference in New Issue
Block a user