[论文解读] Benchmarking JSON BinPack
该论文对JSON BinPack的预生产实现进行了基准测试,这是一种基于JSON Schema的新型、兼具模式驱动与无模式的二进制序列化格式,结果显示在模式驱动模式下,其压缩率中位数和平均值分别较JSON降低86.7%和78.7%;在无模式模式下,分别降低30.6%和30.5%。该格式在空间效率上优于标准二进制格式及最佳情况下的压缩JSON。
In this paper, we present benchmark results for a pre-production implementation of a novel serialization specification: JSON BinPack. JSON BinPack is a schema-driven and schema-less sequential binary serialization specification based on JSON Schema. It is rich in diverse encodings, and is developed to improve network performance and reduce the operational costs of Internet-based software systems. We present benchmark results for 27 JSON documents and for each plot, we show the schema-driven and schema-less serialization specifications that produce the smallest bit-strings. Through extensive plots and statistical comparisons, we show that JSON BinPack in schema-driven mode is as space-efficient or more space-efficient than every other serialization specification for the 27 documents under consideration. In comparison to JSON, JSON BinPack in schema-driven mode provides a median and average size reductions of 86.7% and 78.7%, respectively. We also show that the schema-less mode of the JSON BinPack binary serialization specification is as space-efficient or more space-efficient than every other schema-less serialization specification for the 27 documents under consideration. In comparison to JSON, JSON BinPack in schema-less mode provides a median and average size reductions of 30.6% and 30.5%, respectively. Unlike other considered schema-driven binary serialization specifications, JSON BinPack in schema-driven mode is space-efficient in comparison to best-case compressed JSON in terms of the median and average with size reductions of 76.1% and 66.8%, respectively. We have made our benchmark results available at jviotti/binary-json-size-benchmark on GitHub.
研究动机与目标
- 评估JSON BinPack这一新型JSON二进制序列化格式相较于现有模式驱动与无模式格式的空间效率。
- 评估JSON BinPack是否能在多种真实世界JSON文档中,实现对原始二进制格式及压缩JSON的更优压缩效果。
- 确定模式驱动的二进制序列化是否能够超越通用数据压缩,从而挑战关于文本格式压缩优越性的既有假设。
- 为JSON BinPack的未来开发与生产环境应用提供可复现的基准测试。
提出的方法
- 基准测试使用JSON BinPack的预生产TypeScript实现,在模式驱动与无模式两种模式下,对27个真实世界JSON文档进行了评估。
- 对于每份文档,选取模式驱动与无模式JSON BinPack输出的最小位串,并与13种成熟的二进制序列化格式及压缩JSON进行对比。
- 对比涵盖压缩率的中位数、平均值及范围的统计分析,结果按文档大小与内容类型分层呈现。
- 基准测试采用标准化压缩格式(如gzip、zstd)作为最佳情况下的压缩JSON,确保对比公平性。
- 研究利用JSON Schema实现模式驱动编码,对不支持的关键字则回退至无模式模式。
- 所有基准测试结果与代码均已发布在GitHub,确保可复现性。
实验结果
研究问题
- RQ1在空间效率方面,JSON BinPack的模式驱动模式相较于其他模式驱动的二进制序列化格式表现如何?
- RQ2在空间效率方面,JSON BinPack的无模式模式相较于其他无模式二进制序列化格式表现如何?
- RQ3在模式驱动模式下,JSON BinPack是否能超越最佳情况下的压缩JSON在压缩率上的表现?
- RQ4在哪些文档类型或大小范围内,JSON BinPack展现出最显著的压缩增益?
主要发现
- 在模式驱动模式下,JSON BinPack相较JSON实现86.7%的中位数压缩率与78.7%的平均压缩率。
- 在无模式模式下,JSON BinPack相较JSON实现30.6%的中位数压缩率与30.5%的平均压缩率。
- 在模式驱动模式下,JSON BinPack的压缩率优于最佳情况下的压缩JSON,中位数与平均压缩率分别为76.1%与66.8%。
- 在无模式格式中,JSON BinPack在27份文档中的27份中达到或超过所有其他替代方案的性能;然而,在13份文档中,最佳情况下的压缩JSON表现更优,主要集中在小型文本类文档中。
- JSON BinPack的模式驱动模式在所有评估的模式驱动二进制格式中(包括Protocol Buffers与Cap’n Proto)均展现出最高的空间效率。
- 本研究证实,精心设计的模式驱动二进制格式可超越通用数据压缩对JSON的压缩效果,挑战了关于文本格式压缩优越性的既有假设。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。