nolanlawson / optimize-js

Optimize a JS file for faster parsing (UNMAINTAINED)

Home Page:https://nolanlawson.github.io/optimize-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Your math is wrong

BlueRaja opened this issue · comments

You list 9.42ms --> 5.27ms as a 128.73% improvement, but list 12.76ms --> 1.75ms as an 86.29% improvement!?

The actual correct percentages are "78.75% and 629.14% increases in speed (respectively)", or equivalently, "44.06% and 86.29% decrease in runtime".

The formulas are:
Increase in speed: old/new - 1
Decrease in runtime: 1 - new/old

Fixed in #14 ; the improvement numbers were indeed miscalculated by a bit. Thanks for reporting!