An automated algorithm tool for running time
I am wondering if there is an open source project that can run the algorithm and tell us what the running time is (just need to know the Big-Oh running time).
I know I can do this with hands, but a lot of algorithms are too long or too complex to actually trace the running time.
Thanks.
PS: Mainly for C++ (but it works for more than just C++ 开发者_开发技巧would be nice!!)
There's just no way to do this. You'll never know generally what set of n
you have to test for any given algorithm. For example sin
and linear will look almost identical at small values of t
(the input). Exponential can look polynomial in various ranges of input. For other functions, the constant time may make a linear function look sublinear.
The way to figure out the big-oh complexity is to just analyze the algorithm yourself.
精彩评论