250e073408
* Benchmark script * Rewrite unmarshaler using the stack Instead of tracking the build chain using `target`s, use the stack instead. Working and most benchmarks look good, but regression on structs unmarshalling. ~60% slower on ReferenceFile/struct. * Shortcut to check if last node of iterator * Remove unecessary pointer allocation * Skip over unused keys without marking them as seen * Add some tests * Fix mktemp on macos
14 lines
381 B
Go
14 lines
381 B
Go
package toml
|
|
|
|
import (
|
|
"encoding"
|
|
"reflect"
|
|
"time"
|
|
)
|
|
|
|
var timeType = reflect.TypeOf(time.Time{})
|
|
var textMarshalerType = reflect.TypeOf(new(encoding.TextMarshaler)).Elem()
|
|
var textUnmarshalerType = reflect.TypeOf(new(encoding.TextUnmarshaler)).Elem()
|
|
var mapStringInterfaceType = reflect.TypeOf(map[string]interface{}{})
|
|
var sliceInterfaceType = reflect.TypeOf([]interface{}{})
|