Two-dimensional bidirectional object layout

被引:0
作者
Gil, Joseph [1 ]
Pugh, William [2 ]
Weddell, Grant E. [3 ]
Zibin, Yoav [1 ]
机构
[1] Technion Israel Inst Technol, IL-32000 Haifa, Israel
[2] Univ Maryland, Dept Comp Sci, College Pk, MD 20742 USA
[3] Univ Waterloo, Waterloo, ON N2L 3G1, Canada
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2008年 / 30卷 / 05期
基金
以色列科学基金会;
关键词
algorithms; design; measurement; performance; theory; bidirectional; coloring; hierarchy; inheritance; layout;
D O I
10.1145/1387673.1387677
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Object layout schemes used in C++ and other languages rely on (sometimes numerous) compiler generated fields. We describe a language-independent object layout scheme, which is space optimal, that is, objects are contiguous, and contain no compiler generated fields other than a single type identifier. As in C++ and other multiple inheritance languages such as CECIL and DYLAN, the new scheme sometimes requires extra levels of indirection to access some of the fields. Using a data set of 28 hierarchies, totaling almost 50,000 types, we show that this scheme improves field access efficiency over standard implementations, and competes favorably with (the non-space-optimal) highly optimized C++ specific implementations. The benchmark includes an analytical model for computing the frequency of indirections in a sequence of field access operations. Our layout scheme relies on whole-program analysis, which requires about 10 microseconds per type on a contemporary architecture (Pentium III, 900Mhz, 256MB machine), even in very large hierarchies. We also present a layout scheme for separate compilation using the user-annotation of virtual inheritance edge that is used in C++.
引用
收藏
页数:38
相关论文
共 24 条
  • [1] [Anonymous], 1984, Smalltalk-80: The Interactive Programming Environment
  • [2] BORNING A, 1982, P AAAI 82, P234
  • [3] CARGILL TA, 1993, ACM SIGPLAN INT C OB
  • [4] CHAMBERS C, 1993, TR930305 U WASH
  • [5] DIXON R, 1989, ACM SIGPLAN NOTICES, V24, P211
  • [6] Eckel N, 2000, LECT NOTES COMPUT SC, V1850, P394
  • [7] Gil J, 1999, ACM SIGPLAN NOTICES, V34, P256, DOI 10.1145/320385.320408
  • [8] LIPPMAN SB, 1996, INSIDE C OBJECT MODE
  • [9] MAGNUSSUN B, 1994, P INT C TECHN OBJ OR
  • [10] MOON DA, 1986, SIGPLAN NOTICES, V21, P1, DOI 10.1145/960112.28698