Speed such as
<%
Dim A (10000), i,t
T=timer
For I=0 to 10000
A (i) =cstr (i)
Next
Response.Write Join (A,VBCRLF)
Response.Write Timer-t
Erase A
%>
Speed can be spelled with PHP (though not as fast as he does)
Another way to use it is
S=join (Array ("1", "2", "3",....., "9999"))
The speed is still much faster than "1" & "2" & "3" & .....& "9999"
Detailed test data can be seen:
////////////////////////////////////////////////////
{The client template for testing}
////////////////////////////////////////////////////
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<meta name= "generator" content= "EditPlus" >
<meta name= "Author" content= "" >
<meta name= "Keywords" content= "" >
<meta name= "Description" content= "" >
</HEAD>
<BODY>
<script language= "VBScript" >
Dim t
T=timer
</script>
<!--here put the server test script-->
<script language= "VBScript" >
Document.Write "|" & (TIMER-T) ' Output the time taken by the client to fully accept all data
</script>
</BODY>
</HTML>
////////////////////////////////////////////////////
{The code for each script you tested}
////////////////////////////////////////////////////
//--------------------------------------------------
Test-js.asp
Use an array to collect all the character channeling and finally join the Join function
//--------------------------------------------------
<script language= "JavaScript" runat= "Server" >
var i,t,s;
var a=new Array (10000);
t= (New Date ()). GetTime ();
for (i=0;i<10000;i++) {
S+=string (i) + "";
A[i]=string (i);
}
S=a.join ("");
Response.Write (s);
Response.Write ("<br>" +string (New Date ()). GetTime ()-T);
A=null;
S=null;
</Script>
//--------------------------------------------------
////////////////////////////////////////////////////
//--------------------------------------------------
Test-js2.asp
//--------------------------------------------------
<script language= "JavaScript" runat= "Server" >
var i,t,s= "";
t= (New Date ()). GetTime ();
for (i=0;i<10000;i++) {
S+=string (i) + "";
}
Response.Write (s);
Response.Write (New Date ()). GetTime ()-T);
A=null;
S=null;
</Script>
//--------------------------------------------------
////////////////////////////////////////////////////
//--------------------------------------------------
Test-js3.asp
Each data is obtained, and is immediately exported to the data stream.
//--------------------------------------------------
<script language= "JavaScript" runat= "Server" >
var i,t;
t= (New Date ()). GetTime ();
for (i=0;i<10000;i++) {
Response.Write (i+ "");
}
Response.Write ("<br>");
Response.Write (New Date ()). GetTime ()-T);
</Script>
//--------------------------------------------------
////////////////////////////////////////////////////
//--------------------------------------------------
Test-js3.asp
This program creates a zero file and enters all the content into the file, and the final unified output
The component used to establish the zero file is the FSO
//--------------------------------------------------
<script language= "JavaScript" runat= "Server" >
var i,t;
t= (New Date ()). GetTime ();
var fso=server.createobject ("Scripting.FileSystemObject");/Create an FSO object
var f=fso. CreateTextFile (Server.MapPath ("Temp.txt"), true);//Create a zero file through the FSO object
for (i=0;i<10000;i++) {
F.writeline (i);
}
F.close ();
F=fso. OpenTextFile (Server.MapPath ("Temp.txt"), 1);
Response.Write (F.readall ())//Read the contents of a zero file
F.close ();
F=null;
Fso=null;
Response.Write ("<br>");
Response.Write (New Date ()). GetTime ()-T);
</Script>
//--------------------------------------------------
////////////////////////////////////////////////////
//--------------------------------------------------
Test-js5.asp
This program creates a zero file and enters all the content into the file, and the final unified output
The component used to establish the zero file is ADODB.stream
//--------------------------------------------------
<script language= "JavaScript" runat= "Server" >
var i,t;
t= (New Date ()). GetTime ();
var ado=server.createobject ("ADODB