Home  >  Article  >  php教程  >  探讨应当如何提高PHP递归效率

探讨应当如何提高PHP递归效率

WBOY
WBOYOriginal
2016-06-13 11:07:341405browse

我们在实际代码编程中,会发现在我的IIS 服务器上(CGI)模式,我的PHP递归效率测试结果是:

非递归调用的花费:0.036401009559631
递归调用的花费:0.053439617156982

在我的Apache 服务器上,我的测试结果是:

非递归调用的花费:0.022789001464844
递归调用的花费:0.014809131622314

PHP递归效率的结果完全相反,而PHP的版本是一样的。

看来对PHP递归效率要具体问题具体分析了。


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn