angular/angular.js — pull request #5388 by bwiklund (2013-12-13 00:38:17+00:00)
Title: perf($injector)

I did some testing on switch vs apply: http://jsperf.com/angularjs-invoke-apply-vs-switch

The existing benchmark always made calls with the same number of args (4), so I assume branch prediction is what made that so quick. (http://jsperf.com/apply-vs-call-vs-invoke/30)

However, in my benchmark, each invoke call has a different (random) number of arguments, which I feel is closer to real world conditions. Switching back to just `apply` seems to be about 30% faster, and saves a good bit of code as well.

It's also possible I've messed up the benchmark.

Thoughts?