2016 · 12 citations · 14 references
ComputingComputer EngineeringComputer ScienceCompilersComputer ArchitectureProgramming LanguagesBenchmarkingJust-in-time CompilationPerformance Bottleneck AnalysisSpeculative ExecutionType CheckingDeoptimizationHigh PerformanceJavascriptJavascript Performance OptimizationMicroarchitectural OptimizationPower ConsumptionPower Consumption OptimizationSpeculation
Just-in-time compilation for dynamic languages uses type speculation to generate optimized code for frequently executed code sections. However, even the high-performance code requires checks to ensure that assumptions made during code generation are not violated. If the assumptions are violated then the program reverts to executing unoptimized code. This process is called deoptimization, and the checks are called deoptimization checks. We analyzed the frequency of conditional deoptimization checks and the performance impact of the associated conditional branch using the V8 Javascript engine running the Octane benchmarks. Over half of the benchmarks have at least 5 checks per 100 instructions, and 1 benchmark has as many as 19 checks per 100 instructions. The performance impact of the checks varies significantly depending on the microarchitecture of the CPU that is running the code. On average the conditional branch used by the checks accounts for over 6.2% of the benchmark's dynamic instructions. Removing these checks provides only a 2.2% performance improvement when running on a high performance Intel CPU, but a 4.6% performance improvement on an Intel CPU optimized for low power consumption.
14
Scripting: higher level programming for the 21st Century
John K. Ousterhout · Computer · 1998 · 650 citations
Efficient implementation of the smalltalk-80 system
L. Peter Deutsch, Allan M. Schiffman · 1984 · 589 citations
An analysis of the dynamic behavior of JavaScript programs
Gregor Richards, Sylvain Lebresne, Brian R. Burg et al. · 2010 · 356 citations