Interpreted vs. Compiled Languages for Web Sites (PHP, ASP, Perl, Python, etc.)

前端 未结 7 816
名媛妹妹
名媛妹妹 2021-02-09 10:04

I build database-driven web sites. Previously I have used Perl or PHP with MySQL.

Now I am starting a big new project, and I want to do it in the way that will result in

相关标签:
7条回答
  • 2021-02-09 10:33

    There are lots of parts that goes into a web application. The time taken by the application layer doesn't need to be big. For a typical application, the biggest hogs would be in the webserver and in the database. Replacing PHP with a binary cgi isn't going to change this.

    Furthermore, while the interpreted parts of PHP may be somewhat slow, that is only a small part of what goes on in the execution of a PHP script. All the functions that are provided as part of the language are implemented in native code. For example, when you call a function like preg_match, it will call out a native code library and let it do its work. This means that there is less actual interpretation going on than you might think.

    There may be some cases where using a different language than PHP might be worthwhile, but those are special cases. In general, there is nothing to gain here.

    0 讨论(0)
提交回复
热议问题