github simdjson/simdjson v0.6.0
Version 0.6.0

latest releases: v3.9.1, v3.9.0, v3.8.0...
3 years ago

Release 0.6 features faster serialization, updated number parsing and a new parsing API (On Demand).

Novel parsing approach: Prior to release 0.6, the simdjson only supported the DOM model. In the DOM model, you parse the entire document eagerly and then query the resulting parsed document. With release 0.6, we have introduced an innovative new query model called "On Demand" (credit: @jkeiser). As the name suggests, the programmer can now access only the components of the JSON documents that are needed. It is useful when the dialect of the JSON document is known at compile-time. It can multiply the performance: on a benchmark where we retrieve unique identifiers from a file, we go from 2.3 GB/s to 4.6 GB/s. Compared to the generic DOM approach, the On Demand strategy may improve parsing speed and reduce memory usage. The On Demand API is both easy to use and highly efficient. We encourage our users to try out the new On Demand API and to provide constructive feedback. Though it is well tested, we consider On Demand to be a novel and experimental feature that will receive further updates in the upcoming releases including runtime dispatching. Users should be mindful that the On Demand API is subject to change in future releases, we encourage testing more than deployment. Please check our documentation:
https://github.com/simdjson/simdjson/blob/master/doc/ondemand.md

Performance:

  • Serializing a parsed JSON element is about 10x faster compared to previous releases.

New features:

  • We make it easier to check whether a given implementation/kernel is available at runtime with a new function my_implementation->supported_by_runtime_system().

Correctness:

  • Serialization is now guaranteed to be locale-independent.
  • We have redone the number parsing routines and extended our testing. We no longer fall back on the system's C library thus avoiding potential sources of unexact parsing.
  • Fuzz testing has been extended. E.g., our standalone UTF-8 validation is now fuzz tested. (Credit @pauldreik)

Don't miss a new simdjson release

NewReleases is sending notifications on new releases.