On Feb 28, 2005, at 12:07 AM, Salvetti2 wrote:
Hi Norman,
Assume that the "case" test takes 40 cycles (for example) and the "if"
test
takes 20 cycles.
Taking the ratio would give you:
40/20 = 2x
Now, consider that from the 40 cycles used by the "case" test, 10 were
used
by the loop overhead. The loop overhead is the same for the "if" test,
then
(10+30) / (10+10) = 2x
however, the rate between the cycles wasted by the "case" and "if"
blocks is
30/10 = 3x
So, it's not enough to assume that the loop overhead is the same.
You have to find the loop overhead value in order to get the right
result.
Arthur Salvetti
I can do that by simply running the loop with no if or selects.
I doubt the ratio will change and that the loop overhead is actually
constant between the two tests.
I'd actually be stunned if it weren't
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|