As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center作为指导。
                            
                        
                    
                
                                7年前关闭。
            
                    
因此,假设我有500个字符串,例如:


<script>something here</script>
get_magic_quotes_gpc(
...


说这些字符串存储在数据库中(mysql)

Java或Php是否通常更快地递归地遍历目录,子目录并查找数据库提供的字符串?

两者能否一样快(基于编写的代码的质量)?

我一直在尝试研究它,似乎Java更快,但是如果说字符串存储在本地数组中(而不是存储在数据库中),php是否可以同样快?

我不是在这里尝试创建java vs php战争,但是我想提供一些证据,证明一个比另一个更快,或者两者在很大程度上可以一样快(基于编写的代码)?

谢谢

最佳答案

您在这里看到的称为过早优化。不要这样选择您最了解的语言(或对当前项目最有效的语言),然后从那里开始。

进一步阅读:


https://softwareengineering.stackexchange.com/questions/80084/is-premature-optimization-really-the-root-of-all-evil
http://en.wikipedia.org/wiki/Program_optimization

10-04 21:53
查看更多