Re:Show HN: A fast JSON library for Go
by jdknezek on Tuesday February 09, 2021 @02:12PM
(#26081366)
Are you unmarshaling to interface{}?
Have you tried commenting out the easyjson json.Un/Marshaler implementations? By default they wrap the easyjson code and add reflection overhead.
I had the same results when testing with a project that is already using easyjson, but after commenting out easyjson's json.Un/Marshaler impls I am seeing much improved performance using goccy/go-json.
Re:Show HN: A fast JSON library for Go
by mkarlsch on Tuesday February 09, 2021 @03:54PM
(#26082256)
Indeed. Thanks for the hint! While the allocations are still 2.5x, not by accident calling into easyjson makes goccy/go-json perform faster than easyjson with generated code by ~10%. That is some impressive result.
Any chance that you will implement code generation like easyjson?