angular/angular.js — pull request #5424 by bwiklund (2013-12-16 06:31:51+00:00)
Title: perf($parse): un-un-rolling loop for deprecated code

I spent the evening re-rolling an unrolled loop in $parse, only to find that I had made it slower :(

https://github.com/bwiklund/angular.js/tree/sce-loop-rolling
http://jsperf.com/angularjs-sce-loop-rolling

I got sceSafeGetterFn to create the getter faster, but much to my disappointment, the original, unrolled code was about 25% faster than the vanilla for-loop code. It's a shame, because that saved ~800 bytes of code post-minification.

__However__, most of that savings was in the now deprecated promise unrolling code, which I've rolled back up in this PR. I figure that shrinking the build by a significant amount is worth a slight slowdown to deprecated functionality, but maybe not.

PS, here's both cases fully rolled up. https://github.com/bwiklund/angular.js/tree/sce-loop-rolling

Thoughts?