Automatic inline allocation of objects

Julian Dolby
1997 Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation - PLDI '97  
Object-oriented languages like Java and Smalltalk provide a uniform object model that simplifies programming by providing a consistent, abstract model of object behavior. But direct implementations introduce overhead, removal of which requires aggressive implementation techniques (e.g. type inference, function specialization); in this paper, we introduce o6ject inlining, an optimization that automatically inline allocates objects within containers (as is done by hand in C++) within a uniform
more » ... el. We present our technique, which includes novel program analyses that track how inlinable objects are used throughout the program. We evaluated object inlining on several object-oriented benchmarks. It produces performance up to three times as fast as a dynamic model without inlining and roughly equal to that of manually-inlined codes. introduction Traditional object-oriented languages (e.g. SmallTalk [13]) sport a simple, uniform, abstract programming model; all objects are accessed via references and all calls are dynamic message sends. This simplifies programming, as the programmer faces a single model of object behavior, and because different portions of programs can be isolated behind opaque interfaces. This abstract model, however, introduces overhead: even simple field accesses become dynamic dispatches, indirection through references is required to accesses every object, and individual functions shrink [5]. Hybrid languages like C++ (111 provide multitudinous lowlevel features (e.g virtual vs non-virtual functions, inline directives, and explicit stack, inline or heap allocation) so programmers can manually reduce overhead by removing unused abstraction. However, the original notion of a clean, simple semantics is m-emerging in recent object-oriented languages (e.g. Java [27], NewtonScript [3], Cecil [7]). This leaves eliding abstraction overhead to aggressive implementations. Dynamic dispatches are optimized statically by type inference Permission to make digital/hard copy of part or all this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication and its date appear, and notice is given that copying is by permission of ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. PLDI '97 Las Vegas, NV, USA 0 1997 ACM 0-89791-907-6/97/0006...$3.50
doi:10.1145/258915.258918 dblp:conf/pldi/Dolby97 fatcat:rdeiwcrupjhu5nuwrtdp6niaoy