Big O vs Hardware: Better Complexity ≠ Better Performance
-
This post did not contain any content.
Big O vs Hardware: Better Complexity ≠ Better Performance
Why Your O(log n) Algorithm Might Lose to O(n)
(blog.codingconfessions.com)
-
This post did not contain any content.
Big O vs Hardware: Better Complexity ≠ Better Performance
Why Your O(log n) Algorithm Might Lose to O(n)
(blog.codingconfessions.com)
TL;DR; don't just count things when a weighted sum is more appropriate.
-
This post did not contain any content.
Big O vs Hardware: Better Complexity ≠ Better Performance
Why Your O(log n) Algorithm Might Lose to O(n)
(blog.codingconfessions.com)
It's the old galactic algorithm. Imagine an algorithm that takes the age of the universe to compute the result, but it always takes the same time independent of the input. This makes it O(1) complexity.
Now imagine you want to sort a list with 100 elements. Pretty much any other sorting algorithm, no matter the complexity, will finish much faster than the galactic one from above.
Complexity matters only when
n
gets large enough, and in some casesn
stays small enough that algorithmic complexity doesn't matter.(Just to make sure I'm not misunderstood: Algorithmic complexity is an incredibly important optimization tool. Most often it's even the best one. But it's not the only one and there are situations where it fails. As always, a good programmer takes everything into account, not just their favourite tool.)
-
This post did not contain any content.
Big O vs Hardware: Better Complexity ≠ Better Performance
Why Your O(log n) Algorithm Might Lose to O(n)
(blog.codingconfessions.com)
TL;DR: Big-O notation describes asymptotic behavior
-
-
-
New Executive Order:AI must agree on the Administration views on Sex,Race, cant mention what they deem to be Critical Race Theory,Unconscious Bias,Intersectionality,Systemic Racism or "Transgenderism
Technology1
-
-
-
Apple business executives ban Fortnite from iOS. People around the world - including in Europe - say their iPhone is preventing them from playing the videogame.
Technology1
-
Chinese EV maker BYD says new fast-charging system could be as quick as filling up a tank
Technology1
-