Skip to content

Consider adding sonic.ConfigStd to the JSON benchmark result #181

@bimoadityar

Description

@bimoadityar

Hi, thanks for the great investigation in jsonbench. I, and I assume some other people, refer to the investigation result to consider which JSON library to use for our usecases.

Now, after some investigation, I discovered that on sonic, there are multiple behavior-changing toggles that may affect the correctness at the cost of performance. Particularly, sonic's ConfigStd seems to aim for more compatibility with encoding/json and better correctness, passing the validateUTF8 test and TestSuite's unescaped control char, newline, and tab testcases.

Now, you might argue that the default config is the one mostly used by the users and better reflects the end-user experience. However, I am thinking that:

  1. From the star counts, it seems reasonable that there may be more user of sonic's ConfigStd rather than some libraries like sonnet.
  2. If the goal of the document is to give balanced overview to JSON library users on what alternatives to use and their pro cons, then telling the user about the existence of this sonic's ConfigStd, which I think is a really valid alternative to encoding/json, would make a lot of sense, regardless of the previous users counts. I assume that is why you also put JSONv1in2 in the comparison?

In conclusion, I would appreciate it if you would consider adding sonic.ConfigStd to the benchmark result, that may help other future JSON users like me that would want to pick the fastest implementation while also caring about correctness. Thanks for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions