<i>Optimization decisions that V8 team have made are much more universal than it might seem.</i><p>That&#x27;s certainly possible, but maybe a competing VM can do better, but finds that everyone has coded specific V8 optimizations.  They may be hesitant to push out their implementation.  It may be a better optimization, but it causes existing code to run slower on their VM.  Thus back to the original statement that implementation quirks find their way into developer code.<p><i>for (IWantThisVariableToEndUpOnGlobalObject in obj) { }</i><p>The variable has to be in the local scope and can&#x27;t be in any higher or lower scope, not just a global scope (which your words acknowledge, but your code snippet doesn&#x27;t).  It&#x27;s easy to end up sending the prop variable through a closure accidentally.  Some real world examples[0][1][2].  Note that the solution requires pushing out to another function just to get around the deopt.  With the sproutcore example being very clear, as they made the change specifically to satisfy the V8 VM.<p>[0] - <a href="https:&#x2F;&#x2F;github.com&#x2F;paperjs&#x2F;paper.js&#x2F;issues&#x2F;466" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;paperjs&#x2F;paper.js&#x2F;issues&#x2F;466</a><p>[1] - <a href="http:&#x2F;&#x2F;www.html5rocks.com&#x2F;en&#x2F;tutorials&#x2F;performance&#x2F;mystery&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.html5rocks.com&#x2F;en&#x2F;tutorials&#x2F;performance&#x2F;mystery&#x2F;</a><p>[2] - <a href="https:&#x2F;&#x2F;github.com&#x2F;sproutcore&#x2F;sproutcore&#x2F;blob&#x2F;master&#x2F;CHANGELOG.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sproutcore&#x2F;sproutcore&#x2F;blob&#x2F;master&#x2F;CHANGEL...</a> (search &quot;Removes V8 &quot;ForIn is not fast case&quot; warning&quot;)