From: Fabien Potencier Date: Tue, 7 May 2013 18:36:38 +0000 (+0200) Subject: merged branch Seldaek/optim2 (PR #1078) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=1fafbe48cc0f44e98d2038fe430d1de425c0bb59;p=web%2Fkonrad%2Ftwig.git merged branch Seldaek/optim2 (PR #1078) 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 --- 1fafbe48cc0f44e98d2038fe430d1de425c0bb59