Stack-based unmarshaler (#546)
* 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
This commit is contained in:
+1
-3
@@ -12,7 +12,6 @@ import (
|
||||
|
||||
//nolint:funlen
|
||||
func TestDecodeError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
examples := []struct {
|
||||
desc string
|
||||
@@ -154,7 +153,7 @@ line 5`,
|
||||
for _, e := range examples {
|
||||
e := e
|
||||
t.Run(e.desc, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
b := bytes.Buffer{}
|
||||
b.Write([]byte(e.doc[0]))
|
||||
start := b.Len()
|
||||
@@ -182,7 +181,6 @@ line 5`,
|
||||
}
|
||||
|
||||
func TestDecodeError_Accessors(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
e := DecodeError{
|
||||
message: "foo",
|
||||
|
||||
Reference in New Issue
Block a user