Hacker News new | ask | show | jobs
by all-fakes 2216 days ago
If we're being pedantic,

> Some bundlers may even have O(n^2) complexity: as your project grows, your dev environment gets exponentially slower

that's clearly not exponential!

3 comments

Yeah, but no one really says "quadratically slower" in the real world, while "exponentially slower" is used by regular non-CS/math/stats people. It's a forgivable inaccuracy.
If they're referencing Big-O notation, in my opinion it is fair to assume that the people reading it are CS/math/stats people
Exponentially slower is flat out false though in this case
Maybe we are mean and they are right, who knows: they said "exponentially slower", which might be true if somehow executing the instructions of the O(N^2) code runs in O(2^N) time due to CPU/RAM/disk limitations.
Huh? n-squared is an exponent
Sure, but for something to be considered exponential running time it must be <some-constant>^n.

So 2^n would be exponential. However, n^2 is instead quadratic.

Quadratic time complexity is better than exponential.

Here is a useful comparison of the rate of growth for various time complexities[0]

[0] https://stackoverflow.com/a/34517541/3574076

Quadratic in this specific case, or more generally: polynomial.
Exponential refers to c^N. N^c is quadratic. Small visualization: https://www.onlinemathlearning.com/image-files/exponential-q...
We call that polynomial, not quadratic.
Both is right, quadratic being subset of polynomial.
It doesn't help that most people in journalism use the phrase exponential growth to describe quadratic growth.
we call that "quadratic". exponential is when the exponent is variable. (unless I'm being whooshed)
No, you're 100% correct.

O(n^[number]) = polynomial, with O(n^2) being quadratic.

O([a number]^n) = exponential.

I guess the authors aren't big on CS fundamentals?

Indeed. It's been a while since I've had to so much as think about big O notation and I forgot that quirk. To most folks "exponential" means n^2 or greater
Most folks are using the word wrong then.
“Superlinear” is the word you’re looking for.
Superlinear can mean O(n log n) or anything like that, which is smaller than O(n^2).
n^0 is also an exponent. Do you consider constant time to be exponential growth?
When family talks to me about covid spreading exponentially I am pretty sure they mean n times n, or n^2

Yes we all know the technical definitions with respect to software and algorithmic complexity. But the lack of sympathy/empathy on display with how a common definition of a word can be misconstrued by someone without an academic background in tech is kind of surprising (ok well maybe not so surprising but c'mon folks, we are all human)

disease spread when modeled is actually exponential.

https://en.wikipedia.org/wiki/Basic_reproduction_number#Esti...