TY - JOUR A1 - Pape, Tobias A1 - Bolz, Carl Friedrich A1 - Hirschfeld, Robert T1 - Adaptive just-in-time value class optimization for lowering memory consumption and improving execution time performance JF - Science of computer programming N2 - The performance of value classes is highly dependent on how they are represented in the virtual machine. Value class instances are immutable, have no identity, and can only refer to other value objects or primitive values and since they should be very lightweight and fast, it is important to optimize them carefully. In this paper we present a technique to detect and compress common patterns of value class usage to improve memory usage and performance. The technique identifies patterns of frequent value object references and introduces abbreviated forms for them. This allows to store multiple inter-referenced value objects in an inlined memory representation, reducing the overhead stemming from meta data and object references. Applied to a small prototype and an implementation of the Racket language, we found improvements in memory usage and execution time for several micro-benchmarks. (C) 2016 Elsevier B.V. All rights reserved. KW - Meta-tracing KW - JIT KW - Data structure optimization KW - Value classes Y1 - 2017 U6 - https://doi.org/10.1016/j.scico.2016.08.003 SN - 0167-6423 SN - 1872-7964 VL - 140 SP - 17 EP - 29 PB - Elsevier CY - Amsterdam ER - TY - JOUR A1 - Pape, Tobias A1 - Felgentreff, Tim A1 - Hirschfeld, Robert A1 - Gulenko, Anton A1 - Bolz, Carl Friedrich T1 - Language-independent Storage Strategies for Tracing-JIT-based Virtual Machines JF - ACM SIGPLAN notices N2 - Storage strategies have been proposed as a run-time optimization for the PyPy Python implementation and have shown promising results for optimizing execution speed and memory requirements. However, it remained unclear whether the approach works equally well in other dynamic languages. Furthermore, while PyPy is based on RPython, a language to write VMs with reusable components such as a tracing just-in-time compiler and garbage collection, the strategies design itself was not generalized to be reusable across languages implemented using that same toolchain. In this paper, we present a general design and implementation for storage strategies and show how they can be reused across different RPython-based languages. We evaluate the performance of our implementation for RSqueak, an RPython-based VM for Squeak/Smalltalk and show that storage strategies may indeed off er performance benefits for certain workloads in other dynamic programming languages. We furthermore evaluate the generality of our implementation by applying it to Topaz, a Ruby VM, and Pycket, a Racket implementation. KW - Implementation KW - collection types KW - memory optimization KW - dynamic typing Y1 - 2016 U6 - https://doi.org/10.1145/2816707.2816716 SN - 0362-1340 SN - 1558-1160 VL - 51 SP - 104 EP - 113 PB - Association for Computing Machinery CY - New York ER - TY - JOUR A1 - Freudenberg, Bert A1 - Ingalls, Dan A1 - Felgentreff, Tim A1 - Pape, Tobias A1 - Hirschfeld, Robert T1 - SqueakJS A Modern and Practical Smalltalk that Runs in Any Browser JF - ACM SIGPLAN notices N2 - We report our experience in implementing SqueakJS, a bitcompatible implementation of Squeak/Smalltalk written in pure JavaScript. SqueakJS runs entirely in theWeb browser with a virtual file system that can be directed to a server or client-side storage. Our implementation is notable for simplicity and performance gained through adaptation to the host object memory and deployment leverage gained through the Lively Web development environment. We present several novel techniques as well as performance measurements for the resulting virtual machine. Much of this experience is potentially relevant to preserving other dynamic language systems and making them available in a browser-based environment. KW - Smalltalk KW - Squeak KW - Web browsers KW - JavaScript Y1 - 2015 U6 - https://doi.org/10.1145/10.1145/2661088.2661100 SN - 0362-1340 SN - 1558-1160 VL - 50 IS - 2 SP - 57 EP - 66 PB - Association for Computing Machinery CY - New York ER - TY - JOUR A1 - Bauman, Spenser A1 - Bolz, Carl Friedrich A1 - Hirschfeld, Robert A1 - Kirilichev, Vasily A1 - Pape, Tobias A1 - Siek, Jeremy G. A1 - Tobin-Hochstadt, Sam T1 - Pycket: A Tracing JIT for a Functional Language JF - ACM SIGPLAN notices N2 - We present Pycket, a high-performance tracing JIT compiler for Racket. Pycket supports a wide variety of the sophisticated features in Racket such as contracts, continuations, classes, structures, dynamic binding, and more. On average, over a standard suite of benchmarks, Pycket outperforms existing compilers, both Racket's JIT and other highly-optimizing Scheme compilers. Further, Pycket provides much better performance for Racket proxies than existing systems, dramatically reducing the overhead of contracts and gradual typing. We validate this claim with performance evaluation on multiple existing benchmark suites. The Pycket implementation is of independent interest as an application of the RPython meta-tracing framework (originally created for PyPy), which automatically generates tracing JIT compilers from interpreters. Prior work on meta-tracing focuses on bytecode interpreters, whereas Pycket is a high-level interpreter based on the CEK abstract machine and operates directly on abstract syntax trees. Pycket supports proper tail calls and first-class continuations. In the setting of a functional language, where recursion and higher-order functions are more prevalent than explicit loops, the most significant performance challenge for a tracing JIT is identifying which control flows constitute a loop-we discuss two strategies for identifying loops and measure their impact. KW - Experimentation KW - Languages KW - Measurement KW - Performance KW - JIT compilers KW - contracts KW - tracing KW - functional languages KW - Racket Y1 - 2015 U6 - https://doi.org/10.1145/2784731.2784740 SN - 0362-1340 SN - 1558-1160 VL - 50 IS - 9 SP - 22 EP - 34 PB - Association for Computing Machinery CY - New York ER - TY - JOUR A1 - Marr, Stefan A1 - Pape, Tobias A1 - De Meuter, Wolfgang T1 - Are we there yet? Simple language implementation techniques for the 21st century JF - IEEE software Y1 - 2014 SN - 0740-7459 SN - 1937-4194 VL - 31 IS - 5 SP - 60 EP - 67 PB - Inst. of Electr. and Electronics Engineers CY - Los Alamitos ER -