# Thread: Working out what percentage time 1 is faster than time 2 with respect to time 2

1. ## Working out what percentage time 1 is faster than time 2 with respect to time 2

Hey everyone, I'm having a little difficulty with something very basic but the problem is kind of subtle and I'm really afraid of getting it wrong in my report because it's one of those mistakes one can easily miss.
I programmed two versions of some code and time tested them. Let's say for example
Time recorded for method 1 = T1 = 1 second.
Time recorded for method 2 = 3 seconds.

I want to now say 'This is the percentage that method 1 is faster than method 2: '.

Given two numbers, A and B, with A larger than B, the amount that "A is larger than B" is A- B. The "percentage that A is larger than B, with respect to B" is $\displaystyle \frac{B- A}{B}$ expressed as a percentage. If method 2 takes 3 seconds while method 1 take 1 second then method 1 is 3- 1= 2 seconds faster than method 2. The percentage that method 1 is faster than method 2, as a percentage of method 2 (or "with respect to method 2) is $\displaystyle \frac{2}{3}= \frac{2}{3}= 0.66666...= 66\frac{2}{3}\%$.