What does 120% less memory usage mean, really?
What does 120% less memory usage mean, really?
The math is like, if it did use 100mb, and now it uses 25mb, that's 300% less, because 25mb is the "100%", and you reduced by that amount 3 times. Odd.
I’d just say 75% drop for 100mb to 25mb.
25 to 100 would be a 300% increase.
100 to 25 would be a 75% reduction.
- "120% less memory usage" - From 9.9 Mb to 4.5 Mb
- "Up to 133% faster updates" - 13.18 (ms?) to 5.64
In both cases, the formula to calculate the percentage is:
= ( PREVIOUS - CURRENT ) / CURRENT
Oh, actually they just changed it. For the memory usage, it's now: = ( PREVIOUS - CURRENT ) / PREVIOUS
..which shows a more intuitive result: -54.55%.100/25-1 = +3 = 300% increase
25/100-1 = -0.92 = 92% decrease
100/25-1 = 3 (300% increase)
25/100-1 = -0.75 (75% decrease).
You can do the same if you measure rendering speed in fps.
100% more of something = 2x more
120% more of something = 2.2x more
120% less of something (problem here!) = 2.2x less = 1 / 2.2 of something = 45% of something
I think the writer meant 2.2x improvement in memory usage rather than 120% less memory usage -- the word "less" used in conjunction with a percentage is confusing.
So 120% less of 10 rocks is -2 rocks, which obviously doesn’t make sense. Which is good, it shouldn’t make sense to have more than 100% less of something.
On a related note, I tend to avoid expressing changes as percentages entirely, in large part because increasing by X% and then decreasing by that same X% doesn't get you back to where you started.
Perf is on par with Preact.
RC4 is not the final release though, we'll see how it goes with 3.0.0
[1] https://krausest.github.io/js-framework-benchmark/current.ht...
There are other languages which would use similar constructs where it wouldn’t be wrong.