merged branch Seldaek/optim2 (PR #1078)
authorFabien Potencier <fabien.potencier@gmail.com>
Tue, 7 May 2013 18:36:38 +0000 (20:36 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Tue, 7 May 2013 18:36:38 +0000 (20:36 +0200)
This PR was merged into the master branch.

Discussion
----------

Optimize resume after for loops by using + vs array_merge

The plus operator seems to be almost twice as fast as array_merge, so I think in this case and given it's compiled code not made for humans it's worth it. The only potential problem is if you use ints as keys then it won't have the same behavior as array_merge, but I don't know if twig supports this at all, and especially I doubt it's a good idea.

Commits
-------

d753241 Optimize resume after for loops by using + vs array_merge


Trivial merge