Performance Improvement Calculation mumbo jumbo

It’s good that the other day I improved the performance of a piece of code from 34 seconds to 2 seconds, and I calculated the percentage for the same (34-2) / 34, i.e. 94.11 percent, and when I said this number in the meeting people were not impressed. I am wondering if this was the wrong number that I reported.

How do you usually measure improvement and look good at the same time?

+8
performance performance-testing performancecounter
source share
4 answers

Speed ​​(or bandwidth) is proportional to the inverse of time. So this is actually a factor of 34/2 = 17x faster (which you can say as an increase in speed (34-2)/2 = 1600% if you want the sound to be impressive).

+12
source share

I think I would say: "I increased the speed better than 16 times" or "I did it an order of magnitude (base 16, of course) faster." If you want to look good at the same time, you may have to buy new clothes. (Of course, I've been chatting with marketing weenies for too long, so I use phrases like "better than" because it looks like heaven.)

+1
source share

How about “being completed in one seventeenth of the time” or “plain”, it takes two seconds compared to thirty-four earlier ??

0
source share

First, you have to be very careful how you express it. To say that something is twice as fast is the same as saying that it has improved 100%, which means the same thing as saying that it is 200% of what it was (whatever that says) ) When you say "improved" or "increased", you have a hidden link to the original amount + improvement.

Example: You have 3 dollars. You double your money up to $ 6. This is a 100% improvement (or a 100% increase) because you have the original $ 3 + new $ 3 (which is 100% of the original amount). But you can also say that you have 200% as much as it was before, because $ 3 * 200% = $ 3 * 2 = $ 6.

Now, as far as speed goes, think about it in terms of the old algebra equation: Speed ​​* Time = distance. Except for us, "Distance" is more like "Doing the job."

So, if a specific task takes 1 second, and you changed it to make it do the same job in 0.5 seconds: Original

R * 1sec = 1job

R = 1job / 1sec = 1 job / sec

New R * 0.5sec = 1job

R = 1job / 0.5sec = 2 job / sec

Thus, your speed doubled. You can say that the rate has increased by 100% or that the rate has doubled or that it is 200% as fast as before.

-------------------- edit to use OP numbers ------

Original

R * 34sec = 1job

R = 1job / 34sec = 1/34 job / sec = 0.029 job / sec

New

R * 2sec = 1job

R = 1job / 2sec = 1/2 job / sec = 0.5 job / sec

So, to compare rates of 0,029 tasks / second to 0,5 tasks / second

0.5 / 0.029 = 17

Thus, the new code runs 17 times faster or 1700% faster, or increases by 1600%.

0
source share

All Articles