R
Roland Hall
I've read numerous articles, more than I can count, on ASP performance. I
see conflicting information so I did some tests on my own.
getstring and getrows are actually faster than recordset looping.
However, I've read in looping that Do While...Loop is the fastest and
For...Next the slowest but my tests prove otherwise.
I've tested:
Do...Loop
Do While...Loop
Do Until...Loop
While...Wend
For...Next
I didn't think I could do an accurate test with For...Each unless I used a
collection or an array.
I also see conflicting information on string concatenation and
Response.Write
Is this better?
dim str
str = str & "this "
str = str & "that "
str = str & "this and that"
Response.Write str
or this?
dim str
Response.Write "this "
Response.Write "that "
Response.Write "this and that"
I've also seen to speed the last one up:
with Response
.Write "this "
.Write "that "
.Write "this and that"
end with
Are there reliable performance tests that can be reviewed?
Does it vary between languages? ASP:VBscript, ASP:JScript, C/C++, Delphi,
VB, C#
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
see conflicting information so I did some tests on my own.
getstring and getrows are actually faster than recordset looping.
However, I've read in looping that Do While...Loop is the fastest and
For...Next the slowest but my tests prove otherwise.
I've tested:
Do...Loop
Do While...Loop
Do Until...Loop
While...Wend
For...Next
I didn't think I could do an accurate test with For...Each unless I used a
collection or an array.
I also see conflicting information on string concatenation and
Response.Write
Is this better?
dim str
str = str & "this "
str = str & "that "
str = str & "this and that"
Response.Write str
or this?
dim str
Response.Write "this "
Response.Write "that "
Response.Write "this and that"
I've also seen to speed the last one up:
with Response
.Write "this "
.Write "that "
.Write "this and that"
end with
Are there reliable performance tests that can be reviewed?
Does it vary between languages? ASP:VBscript, ASP:JScript, C/C++, Delphi,
VB, C#
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp