News for hackers. Stuff that matters.
Re:Instagram is shifting to videos – users aren't happy by kuboble on Wednesday July 27, 2022 @04:50PM (#32256763)
I don't know if that is helpful but logarithms are quite an easy concept that helps with thinking about code complexity.

It's an inverse of exponent which translates to " grows very slowly with input size. 10 for a thousand, 20 for a million etc.". It helps to quickly ballpark feasability the same way exponential complexity usually means "doesn't scale above 30"

Log(n) is a

- number of digits required to write a number

- depth of a balanced tree of size n

- running time of any algorithm working on input of size n which does fixed cost operation to cut input in half (e.g binary search). If your code has cost function f(n) = 1 + f(n/2) then it has logarithmic performance.

There are no comments on this comment yet.