Hacker News new | past | comments | ask | show | jobs | submit login

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less).

What does 120% less memory usage mean, really?




It's definitely not how to show that, but if you follow their link (https://docs.google.com/spreadsheets/d/1VJFx-kQ4KjJmnpDXIEai...), you'll see the numbers.

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.


Thank you for the link to the spreadsheet. Exact numbers they show are:

- "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%.


Is this the lingo that statisticians/mathematicians use?

I’d just say 75% drop for 100mb to 25mb.


No, it’s plain wrong. You could say «vue 2 uses 120% more memory than vue3», but vice versa is thus a different percentage (yes, 75%).


No, I think it's just weird :)


you would say "use 1/4th as much memory" if you were a normal person.


This kind of arithmetic is always very unclear and causes all kinds of confusion / miscommunication. This is why I always prefer to be explicit about the absolute numbers (maybe in addition to the relative percentages): "it used 100 mb and now it uses 25 mb (which is a 300% reduction when looking at the final result / which is a 75% reduction based on the initial result)".


Yeah.

25 to 100 would be a 300% increase.

100 to 25 would be a 75% reduction.


The only people I've seen use such nonsense were marketing departments. Do they think people can't do basic fractions any more?


Thanks for the link. Someone just started fixing the spreadsheet right now!


These "75%"/"300%" numbers are ridiculous, the two numbers are calculated completely differently. At least be consistent.

100/25-1 = +3 = 300% increase

25/100-1 = -0.92 = 92% decrease


i think your math is wrong, bud.

100/25-1 = 3 (300% increase)

25/100-1 = -0.75 (75% decrease).



Yes I made a dumb. oops.


I can only suppose it means 100% less memory consumption by Vue, and then Vue somehow frees 20% of memory from other running processes, which would lead to some pretty interesting results.


also being 130% faster it's rendering results before computations


That one is not so odd. If you drive 10 mph and accelerate to 23 mph, you're now 130% faster.

You can do the same if you measure rendering speed in fps.


I see the confusion.

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.


I think this is how you evaluate X% less: amount * (1 - (x / 100))

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.


The only way this makes sense to me is if memory usage was reduced by a factor of 1.2, but that sounds so much more modest than "120% less" that I'm doubting myself.

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.


In the latest JS benchmarks[1], Vue 3 RC4 is not doing so great in the startup metrics or memory usage.

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...


Means writer isn't mathematically literate?


120% less mathematically literate than the last writer.


What's with the harsh attitude? It may have been a simple typo.


It means the writer isnt great at English.

There are other languages which would use similar constructs where it wouldn’t be wrong.


Do other languages math differently?


I'm seeing this more often, esp like 3x cheaper it hurts my head. For 120% less I'm thinking 100/220= it uses 45% of the memory it used to.


I guess it means 20% memory usage relative to the previous version?


It doesn't need memory anymore. Writes raw to spinning disk. 2% faster -50% of the time


It also goes ahead and downloads some extra RAM for you.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: