JavaScript Object Notation or JSON is a ubiquitous data exchange format on the Web. Ingesting JSON documents can become a performance bottleneck due to the sheer volume of data. We are thus motivated to make JSON parsing as fast as possible. Despite the maturity of the problem of JSON parsing, we show that substantial speedups are possible. We present the first standard-compliant JSON parser to process gigabytes of data per second on a single core, using commodity processors. We can use a quarter or fewer instructions than a state-of-the-art reference parser like RapidJSON. Unlike other validating parsers, our software (simdjson) makes extensive use of Single Instruction, Multiple Data (SIMD) instructions. To ensure reproducibility, simdjson is freely available as open-source software under a liberal license.
翻译:JavaScript对象表示法(JSON)是Web上普遍存在的数据交换格式。由于数据量巨大,JSON文档的摄取可能成为性能瓶颈。因此,我们致力于使JSON解析尽可能快速。尽管JSON解析问题已相当成熟,但我们证明仍有大幅提速的空间。我们提出了首个符合标准的JSON解析器,能够在单核商用处理器上实现每秒千兆字节级的数据处理速度。相较于RapidJSON等先进参考解析器,我们的指令使用量可减少四分之三或更多。与其他验证型解析器不同,我们的软件(simdjson)广泛使用了单指令多数据(SIMD)指令。为确保可复现性,simdjson已作为开源软件在宽松许可下免费发布。