0

I'm confusing myself over a rather pedantic math question. I'm comparing two simulation's runtimes (measured in seconds). I want to know how many times faster is simulation A compared to simulation B.

Normally, I report the result as a percentage, e.g., simulation A is 50% faster than simulation B. To get this percentage, I can simply divide $$t_A / t_B$$. 50% faster is equivalent to "1 times speedup". I'm wondering what is the equation to get this speedup number on less nice numbers?

24n8
  • 1,455

1 Answers1

1

To say a value $x$ is $p\%$ greater than a value $y$ means that $\dfrac {x-y}y \times 100\% = p\%$. That fraction can also be expressed as $\left(\dfrac xy - 1\right)$. In this case, you are comparing the speeds to accomplish the task, which will be $x = \dfrac 1{t_A}$ and $y = \dfrac 1{t_b}$, so $$\dfrac xy = \dfrac{\dfrac 1{t_A}}{\dfrac 1{t_B}} = \frac {t_B}{t_A}$$ and the answer to your question is

  • Simulation A is $\left(\dfrac {t_B}{t_A} - 1\right)\times 100\%$ faster than Simulation B.

In particular A will be $50\%$ faster than B if $t_B = (1.5)t_A$

Paul Sinclair
  • 43,643