--- padmapani19 <padmapani19@...
> I am wondering if there exists a benchmark with which i can compare
> two prime-generating algorithms.for that matter even for
> algorithms.i assume the answer would be a function of space and
> complexity.but i am ignorant of anything like that.
> This came up because in my class i have to compare my algorithm
> that of somebody's.i want to know how people in real world stack up
> their rankings of algorithms.
Minimise the number of variables. Make sure that the things that are
not important for the comparison are the same. i.e. if it's the high
level algorithm that is to be compared, then use identical low-level
libraries. Standardise on GMP or LIP, or Miracl. Unless part of the
assignment is "write fast low level primitives", of course. If it's
the implementation as a whole that's being measured then chose or
write your low leve llibraries carefully, and the only thing that
matters then is the clock.
When I'm benchmarking, I often put a counter to each function and
count how many times each primitive is called, and that's enough to
satisfy my curiosity. Of course, I am ignoring issues such as the
ones Yves mentioned, those of caching etc., but my main interest is
in the ~2^64 arena presently.
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more