聪明的基准,有人吗? [英] Smarty benchmark, anyone?

查看:59
本文介绍了聪明的基准,有人吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑将Smarty用作我的Web应用程序模板解决方案,现在我担心Smarty在纯PHP上的性能.

I am considering Smarty as my web app templating solution, and I am now concerned with its performance against plain PHP.

Smarty网站说应该是相同的,但是,我找不到任何人进行真正的基准测试来证明该陈述是对还是错.

The Smarty site says it should be the same, however, I was not able to find anyone doing real benchmarking to prove the statement right or wrong.

有人做过Smarty vs纯PHP的基准测试吗?还是在此类测试中遇到了一些资源?

Did anyone do some benchmarking of Smarty vs plain PHP? Or maybe come across some resources on such tests?

谢谢

推荐答案

最后,由于Smarty将模板文件编译并缓存到本地PHP代码中,因此实际上在理论上没有性能差异. 当然,由于每次都需要解释的Smarty代码块,总会有一些性能损失.

Because in the end, Smarty compiles and caches the templates files to native PHP-code, there is indeed no theoretical performance difference. Of course there will always be some performance loss due to the chunk of Smarty-code that needs to be interpreted every time.

这篇关于聪明的基准,有人吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆