首页> 外文期刊>Concurrency and Computation >Run-time evaluation of opportunities for object inlining in Java
【24h】

Run-time evaluation of opportunities for object inlining in Java

机译:对Java对象内联机会的运行时评估

获取原文
获取原文并翻译 | 示例

摘要

Object-oriented languages, such as Java, encourage the use of many small objects linked together by field references, instead of a few monolithic structures. While this practice is beneficial from a program design perspective, it can slow down program execution by incurring many pointer indirections. One solution to this problem is object inlining: when the compiler can safely do so, it fuses small objects together, thus removing the reads/writes to the removed field, saving the memory needed to store the field and object header, and reducing the number of object allocations. The objective of this paper is to measure the potential for object inlining by studying the run-time behaviour of a comprehensive set of Java programs. We study the traces of program executions in order to determine which fields behave like inlinable fields. Since we are using dynamic information instead of a static analysis, our results give an upper bound on what could be achieved via a static compiler-based approach. Our experimental results measure the potential improvements attainable with object inlining, including reductions in the numbers of field reads and writes, and reduced memory usage. Our study shows that some Java programs can benefit significantly from object inlining, with close to a 10% speedup. Somewhat to our surprise, our study found one case, the db benchmark, where the most important inlinable field was the result of unusual program design, and fixing this small flaw led to both better performance and clearer program design. However, the opportunities for object inlining are highly dependent on the individual program being considered, and are in many cases very limited. Furthermore, fields that are inlinable also have properties that make them potential candidates for other optimizations such as removing redundant memory accesses. The memory savings possible through object inlining are moderate.
机译:诸如Java之类的面向对象的语言鼓励使用通过字段引用链接在一起的许多小对象,而不是一些整体结构。尽管从程序设计的角度来看这种做法是有益的,但它可能会由于产生许多指针间接而减慢程序的执行速度。解决此问题的一种方法是对象内联:当编译器可以安全地将其合并时,它将小型对象融合在一起,从而删除对已删除字段的读/写操作,从而节省了存储字段和对象标头所需的内存,并减少了数量对象分配。本文的目的是通过研究一组全面的Java程序的运行时行为来衡量对象内联的可能性。我们研究程序执行的痕迹,以确定哪些字段的行为类似于不可插入的字段。由于我们使用动态信息而不是静态分析,因此我们的结果为通过基于静态编译器的方法可以实现的目标提供了上限。我们的实验结果衡量了对象内联可实现的潜在改进,包括减少了字段读取和写入的次数以及减少了内存使用。我们的研究表明,某些Java程序可以从对象内联中受益匪浅,并且速度提高了近10%。出乎我们意料之外的是,我们的研究发现一个案例,即db基准测试,其中最重要的可移植领域是异常程序设计的结果,而解决此小缺陷可以带来更好的性能和更清晰的程序设计。但是,对象内联的机会高度依赖于所考虑的单个程序,并且在许多情况下非常有限。此外,不可移植的字段还具有使其成为其他优化(例如删除冗余内存访问)的潜在候选者的属性。通过对象内联可以节省的内存是适度的。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号