In this experience report we present our early work at improving Smalltalk performance by inlining message sends during compilation. Smalltalk developers typically write small method bodies with one or two statements, this limits a compiler’s ability to perform many optimizations, e.g. common sub-expression elimination. The overhead of message sends in a dynamically typed language introduces a high overhead cost when looking up the class of the message receiver. Inlining messages into a method body produces methods with fewer message sends and more statements allowing the compiler to optimize and generate efficient executable code and avoid lookup overhead. There are several challenges to inlining messages in Smalltalk that need to be resolved.
We describe a generalized inlining approach that can be applied regardless of the execution target - bytecode, threaded-execution, or machine code - allowing interactive debugging with perfect verisimilitude to the JITed code. In this experience report, we describe the inlining approach taken for the Zag Smalltalk compiler that solves for these issues and improves performance.
the paper (VMIL_Inlining_Daniel_Dave-2.pdf) | 546KiB |
Sun 20 OctDisplayed time zone: Pacific Time (US & Canada) change
09:00 - 10:30 | |||
09:00 10mDay opening | Opening Remarks VMIL | ||
09:15 30mResearch paper | Accelerate RISC-V Instruction Set Simulation by Tiered JIT Compilation VMIL Yen-Fu Chen National Cheng Kung University, Meng-Hung Chen National Cheng Kung University, Ching-Chun Huang National Cheng Kung University, Chia-Heng Tu National Cheng Kung University DOI File Attached | ||
09:45 30mResearch paper | An Analysis of Compiled Code Reusability in Dynamic Compilation VMIL Andrej Pečimúth Oracle Labs; Charles University, David Leopoldseder Oracle Labs, Petr Tuma Charles University DOI Pre-print | ||
10:15 15mExperience report | Inlined Code Generation for Smalltalk VMIL Dave Mason Toronto Metropolitan University (formerly Ryerson University), Daniel Franklin Toronto Metropolitan University File Attached |