Better performance/performance: Smarty, Twig or any other?

Asked

Viewed 224 times

2

Although in general the systems of templates for PHP are used for other purposes, such as separating business rules, etc. Which one provides better performance for website loading/performance (or web application)?

Currently, which of these offers the greatest advantage at this point, and this would be the best way for optimization or there are other alternatives?

1 answer

2


Smarty is faster, if that matters. I concluded this by seeing that comparison. Of course I know how to look at these tests as something limited. The test is valid for these conditions, in their conditions can happen something different, depends on the environment, the code, the practices adopted. I don’t even know if the person who performed these tests knows how to use both correctly and has an interest in disclosing unfavorable data to their preferred mechanism.

Then install both, learn how to use them, do what you need in both as best you can and measure performance. This is the only result you can trust.

You’re probably asking other people to take the test for you because, even unconsciously, you know it doesn’t pay to take the test, the difference will be minimal, mainly because you’re already using a language that doesn’t value performance. If one were so much faster than another and that was important, the slow, if not dead, at least would be considered by the whole community as something unfeasible for those who want performance. And this is far from true. Although the specific community has already accepted a certain slowness as normal.

Another important thing. If you need performance don’t use any of them, because they both add runtime bringing results that many question. Use one of them or something else that makes your job easier through ease, not performance.

  • I thank you for the good comments about, where my goal is yes the performance of site, because the focus are sites to be accessed also via mobile, taking into account a slow internet on the part of users.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.