Hacker News new | past | comments | ask | show | jobs | submit login

I wonder what's the performance relative to native JSON parsers?



Disclosure: I manage the Ion and PartiQL teams at Amazon.

We have done some work on performance comparisons with the ion-java-benchmark-cli tool (https://github.com/amzn/ion-java-benchmark-cli). Right now you can compare JSON serialized with Jackson and there is a pull request (https://github.com/amzn/ion-java-benchmark-cli/pull/27) for comparing against CBOR that should be merged soon.

We are always happy to hear suggestions for what is useful in this area.


Parsing ion text should be similar to json, it has the same characteristics. All JSON is valid ion text so you can even parse JSON with an ION parser.

The binary parser is much faster. All fields are length-prefixed so a parser doesn't have to scan forward for the next syntax element.

The ion parsers (lexer? not sure the right vocab) I've worked with have a `JSON.parse` equivalent that returns a fully realized object, a Map, Array, Int, ect but they also have a streaming parser that yields value by value. You can skip over values you don't need, step over structs or into structs without creating a Map or Array. That can be much faster.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: