Asp, php, and jsp performance tests

Source: Internet
Author: User

Asp testing is carried out, and the testing cycle is also 2000*2000 (several zeros can be clearly viewed). The running time is 63 seconds, and the program code is as follows:

<%
Response. write now
Response. write "<br>"
For I = 0 to 2000
For j = 0-2000
Next
Next
Response. write now
%>

Jsp is used for testing.
The test uses 20000*20000 cyclic operations (whether there are any mistakes, so many). The test results are incredible. The program stops running in less than 4 seconds. The program code is as follows:

<Jsp Tutorial: useBean id = 'Clock 'scope = 'page' class = 'Dates. JspCalendar' type = "dates. JspCalendar"/>
<Jsp: getProperty name = "clock" property = "time"/>

<%
Int I = 0;
Int j = 0;
Int k = 0;
For (I = 0; I <20000; I ++ ){
For (j = 0; j <20000; j ++ ){

}
}
%>


<Jsp: useBean id = 'clock1' scope = 'page' class = 'Dates. JspCalendar 'type = "dates. JspCalendar"/>
<Jsp: getProperty name = "clock1" property = "time"/>

PHP is tested. At first, 20000*20000 tests are also prepared. However, no matter how large the maximum running time of the program is, the program cannot be completed. Therefore, it is changed to 2000*2000, the program code is as follows:

<?
$ TTime = date ("Y-n-d"). "". date ("H: I: s ");
Echo $ TTime;
Echo "<br> ";
For ($ I = 0; I I <1000; $ I ++ ){
For ($ j = 0; $ j <1000; $ j ++ ){
}
}
$ TTime = date ("Y-n-d"). "". date ("H: I: s ");
Echo $ TTime;
?>

 

Perform 1000 Insert, Update, Select, and Delete operations on Oracle 8:
Jsp takes 13 seconds
It takes 69 seconds for Php
ASP takes 73 seconds

For the asp tutorial, php Tutorial, jsp performance is better. The result of an operation test above is that jsp is better than other database tutorials.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.