High-performance computing in ASP.NET
Posted on 2003-03-08
I have an algorithm that multiplies a chain of matrices in an optimized order and one that multiplies them from the beginning to the end. I want to show the difference in running time.
What I have now is like this:
I dropped a Timer component onto my web form and gave it a name, set its interval to 1 ms.
private int ms = 0; // milliseconds
// btnTime_Click function
// OnTimer function
So I figured the OnTimer function would increment the number of milliseconds every time a millisecond passed and then stop doing that when the algorithm finished. However, the result seems to remain at 0, which to me either means I'm doing it wrong or my algorithm is faster than 1 ms (which could be reasonable).
*** UPDATE ***
Now there are a few more things going on. If I create a small number of matrices (like, 4) with high dimensions (randomized between 64 and 256) ASPNET is denied access and the server application cannot be found (I guess it locks up?) The same thing happens if I create a large number of matrices (like 200) with small dimensions (between 1 and 128).
However, if I bring the numbers down to just below the threshold, the running time shown by my imprecise timer is always 0 milliseconds.
Anybody have any ideas? Are there any timers that have higher precision than milliseconds?