Skip to content

Perf#25

Open
vitkovskii wants to merge 7 commits into
masterfrom
perf
Open

Perf#25
vitkovskii wants to merge 7 commits into
masterfrom
perf

Conversation

@vitkovskii
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread insane.go
buf []byte
root Root
nodePool []*Node
nodeChunks [][]Node
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related PR #14 which was reverted in #15. For some reason, it was causing an "index out of range" panic on large JSON objects.

However, the []Node approach easier to understand to me. Have you tried going this way?
By the way, that's exactly how it's done in fastjson: https://github.com/valyala/fastjson/blob/b9b26683138c14b7ed5fea7abe226d0ac8b68b26/parser.go#L56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants