Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Benchmarking

Status
Not open for further replies.

Tarwn

Programmer
Mar 20, 2001
5,787
US
This is less of a tip and more of an idea.

Some of you may know tat I have spent a lot of ie in the past benchmaking various methods against one anotherto find the most efficient (or inefficient) ways to do common tasks. One ofthe problems with benchmarking is tat by defaul the inner clocks of most machines are only acurate to a certain number of milliseconds, meaning that in order to benchmark anything that runs fast you need to repeat the test several thousand times.

A thought just occurred to me. ASP allows you to use PerlScript as one of the possible languages. Now generally we would be benchmarking something written in VBScript and mizing languages is a bit of a pain, but there is a Perl library called Time::HiRes that can return sub-millisecond values. I haven't tested this on Windows architecture and don't have a great deal of free time riht now, but my thought is that it wouldn't be to hard to create a timing function/class in PerlScript that made use of this library to provide us with a method to better benchmark production scripts and smaller sub-scripts without having to cranbk a few hundred thousand loops in IIS.
I haven't used this library in a Windows environment, but I would be surprised if it didn't work as well as in *nix platforms.

-T


01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
Good thoughts Tarwn. I have ActivePerl on one of my machines at home and will try this out alter on.

I'll post back with my results.

also, PerlScript runs very well through IIS on a Win box

for everyone taht is interested in better some abilities, this is a great place to do it. setting up IIS to run Perlscript is very, very easy. All you need to do is install ActivePerl and you're pretty much ready to go.

I've used Perl in ASP's before on tasks that vbscript or jscript just wasn't cuttin it. Although this is was prompted me to go PythonScript as I really didn't care for the write of perl [wink]

Star for the life in the forum !!

___________________________________________________________________

onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top