![]() |
Algorithm Timing
Hey guys quick question that I can't seem to get.
I'm trying to show how a program I wrote improves (or worsens) as the number of processors increases. However, I can't for the life of me determine a way to represent the time it take for one of the funcitons to run. Code:
double term = start; Yes, it's homework, but 90% of the assignment was developing and writing the algorithm. Thanks |
Is this it, because I don't see any declarations for start, p and x. It would be nice to know what those are.
|
If you can use perl, there are some good benchmarking features in the benchmark module.
I've used them a few times to test performance of different algorithms. http://www.perldoc.com/perl5.8.0/lib/Benchmark.html |
Are we talking theoretical big-oh stuff or empirical timing, or both? You can use System.currentTimeMillis() for actual timings in milliseconds.
Theoretical.. You're incrementing your outer loop by a constant? 0(n^2) then.. (Can't tell what n is..) |
All times are GMT -8. The time now is 10:53 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project