Reducing Feedback Pollution
summary
JIT compiler for R stores type observations in separate per-call-context feedback vectors instead of one shared vector, so recorded types no longer merge across different call sites. Prototype implements contextual dispatch, updates and optionally merges context-specific vectors when compiling or inlining, and reports ~30% fewer polluted compilations and ~37% less function pollution across the corpus. Implementation raises compilation-time merging and memory trade-offs (growth of per-context tables and merging overhead).
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:04Type feedback in compiler optimizations
- 3:59Polluted type feedback vectors
- 5:24Mitigating feedback pollution
- 7:11B8’s delayed feedback collection
- 8:57Self-optimizing interpreters limits
- 9:20Contextual dispatch benefits
- 12:31Feedback vectors and dispatch
- 14:43Single feedback vector limits
- 15:24Multiple feedback vectors per context
- 17:30Implementation challenges
- 20:19Inline code and deoptimization
- 22:45Feedback for inlining decisions
- 24:12Merging feedback information
- 24:54Question and answer session
related talks
19mReusing Just-in-Time Compiled Code
16mContextual Dispatch for Function Specialization
17mSampling Optimized Code for Type Feedback
30mAn Incremental Approach to JIT Construction
28mCopy-and-Patch Just-in-Time Compiler for R
34mWhat happens to your code when you don't look?
40mJoy of Meta-Tracing Just-in-Time Compilation: More Than Just a VM Generator
15mAmalgamating Different JIT Compilations in a Meta-tracing JIT Compiler Framework
