Hacker News new | ask | show | jobs
by matheusmoreira 265 days ago
> some people need to know about N and Nlog(N) vs N^2.

Every programmer should know enough to at least avoid accidentally making things quadratic.

https://news.ycombinator.com/item?id=26296339

2 comments

Indeed. As an anecdote, I've come across a self professed frontend UI guru writing quadratic code that worked fine in testing because it only had to display a few tens of items there, but at a complete loss why it was unusable in production.
Or, to recognize when they or someone else has done so and recover.

It's often a case of "N won't be large here" and then later N does sometimes turn out to be large.