The performance of many dynamic language implementations suffers from high allocation rates and runtime type checks. This makes dynamic languages less applicable to purely algorithmic problems, despite their growing popularity. In this paper we present a simple compiler optimization based on online partial evaluation to remove object allocations and runtime type checks in the context of a tracing JIT. We evaluate the optimization using a Python VM and find that it gives good results for all our (real-life) benchmarks. 1 Categories and Subject Descriptors D.3.4 [Programming Languages]: Processors—code generation, interpreters, run-time environments General Terms Languages, Performance, Experimentation Keywords Tracing JIT, Partial Evaluation, Optimization