paperbot · PL 论文追踪

全部论文 待读 收藏

P2 HeapBuffers: Why Not Just Using a Binary Serialization Format for Your Managed Memory?

HeapBuffers:为什么不直接把二进制序列化格式用作你的托管内存?
OOPSLA 9(OOPSLA2)2025匹配度 1/10 · 论文属于运行时与编译器优化,解决 Java 序列化/反序列化开销,与用户关注的静态分析、LLM/Agent、浮点或贝叶斯程序分析等核心方向无直接关联;仅因属于 PL 领域而边缘相关。引用 1 inbox
Daniele Bonetta, Júnior Löff, Matteo Basso, Walter Binder
crossref: 2026-09-10

AI 速览

一句话:提出 HeapBuffers,让 Java 托管内存直接采用 IO 就绪的稠密二进制布局,从而消除序列化/反序列化开销。

云应用中数据的序列化与反序列化(DSD)代价高昂,Java 等托管语言尤甚,因为其托管内存采用稀疏、平台相关、与 IO 不兼容的对象布局,每次 IO 都需转换。论文提出 Java 库 HeapBuffers:它保留 Java 友好的托管内存编程模型,但底层数据以稠密、平台无关的内存格式存储,因此可直接对数据执行 IO,无需在 VM 内部表示与外部格式之间来回转换,从根本上省去 DSD。为保证性能,作者结合编译器优化与专用垃圾回收,使访问 HeapBuffers 数据的开销接近普通 Java 对象。实验表明,HeapBuffers 数据可高效访问并可直接用于 IO,DSD 成本实际可忽略,使用 HeapBuffers 的应用其 IO 性能常常比主流 DSD 库快数个数量级。

问题
托管语言(如 Java)的内存布局稀疏、平台相关且与 IO 不兼容,导致序列化/反序列化成为云应用中的主要开销。
方法
设计 HeapBuffers 库,用稠密、平台无关且 IO 就绪的二进制格式存储托管数据,并配合编译器优化与专用垃圾回收,使访问性能接近普通 Java 对象。
评估
通过实验对比 HeapBuffers 与主流 DSD 库,测量数据访问性能与应用的 IO 吞吐,显示 DSD 成本可忽略、IO 性能常快数个数量级。
原文摘要(Abstract)

In modern cloud applications, data serialization and deserialization (DSD) are common yet expensive operations. Languages such as Java incur significant overhead from DSD operations because of their managed memory, which uses an IO-incompatible, sparse, platform-dependent data layout for storing objects. Can language VMs bypass costly DSD operations by directly operating on an IO-ready binary format? In this paper, we address this question by presenting a new DSD library for Java called HeapBuffers. HeapBuffers maintains a Java-friendly programming model through managed memory, yet it operates on data stored using a dense, platform-independent, memory format. In this way, HeapBuffers data can be used to perform IO operations without the need to convert objects from/to a VM-internal memory representation, thus eliminating the need for expensive DSD operations. Compiler optimizations combined with specialized garbage collection ensure that accessing HeapBuffers data is nearly as efficient as handling regular Java objects. The answer to our question is largely positive: our experiments show that HeapBuffers data can be accessed at high performance and can be used as is to perform IO, making the cost of DSD effectively negligible. IO performance of applications using HeapBuffers is often orders of magnitude faster than that obtained using the prevailing DSD libraries.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2956,
  title = {HeapBuffers: Why Not Just Using a Binary Serialization Format for Your Managed Memory?},
  author = {Daniele Bonetta and Júnior Löff and Matteo Basso and Walter Binder},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763175}
}