Home >Web Front-end >JS Tutorial >Using Join and Array in ASP can speed up character connection code_javascript skills

Using Join and Array in ASP can speed up character connection code_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:09:421211browse

I saw a lot of test data on the Internet today. I was too lazy to read it and copied down the conclusions.

For example
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
%>
The speed can compete with php (although it is still not as fast as him) Fast), another usage is s=Join(Array("1","2","3",...,"9999"))
It is still faster than "1" & "2" & "3" & .....& "9999" is much faster

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