Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use easy json #43

Merged
merged 2 commits into from
Sep 1, 2022
Merged

Use easy json #43

merged 2 commits into from
Sep 1, 2022

Conversation

mstoykov
Copy link
Contributor

@mstoykov mstoykov commented Jul 7, 2022

I tried the stdlib one but it turned out it like 2x slower in this particular case :(.

K6 does use easyjson and we never have had a panic.

I did have a panic with the benchmarks with the original json-iterator version one out of 3 runs. Given the list of open panic reports I am not really certain it's good idea to use json-iterator ...

Their performance is in practice the same in this case (you can see benchmark results in the update commit message).

Base automatically changed from updateJSONIterator to main July 7, 2022 12:57
@chaudum
Copy link
Collaborator

chaudum commented Aug 30, 2022

@mstoykov Can you update the base branch of your PR and resolve the conflicts. Then I can merge it.

NewBatch-8                   114µs ± 6%     116µs ± 4%    ~     (p=0.182 n=10+9)
Encode/encode_protobuf-8    5.46µs ± 3%    5.86µs ± 3%  +7.26%  (p=0.000 n=10+10)
Encode/encode_json-8        27.1µs ± 4%    25.1µs ± 5%  -7.42%  (p=0.000 n=9+10)

name                      old alloc/op   new alloc/op   delta
NewBatch-8                  8.23kB ± 0%    8.21kB ± 0%  -0.14%  (p=0.045 n=10+10)
Encode/encode_protobuf-8    2.54kB ± 0%    2.54kB ± 0%    ~     (all equal)
Encode/encode_json-8        5.36kB ± 0%    5.49kB ± 0%  +2.39%  (p=0.000 n=7+10)

name                      old allocs/op  new allocs/op  delta
NewBatch-8                     184 ± 0%       184 ± 0%    ~     (all equal)
Encode/encode_protobuf-8      4.00 ± 0%      4.00 ± 0%    ~     (all equal)
Encode/encode_json-8          64.0 ± 0%      59.0 ± 0%  -7.81%  (p=0.000 n=10+10)
@mstoykov
Copy link
Contributor Author

@chaudum done ?

@chaudum chaudum merged commit 90025b1 into main Sep 1, 2022
@chaudum chaudum deleted the useEasyJSON branch September 1, 2022 08:33
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.

None yet

2 participants