3 ms·
Well, that represents the asymptotic time complexity. So, roughly with an increasing N it increases by log of it. Here is an example of the log(base 2) function
by actuator 7y ago
Well, that represents the asymptotic time complexity. So, roughly with an increasing N it increases by log of it. Here is an example of the log(base 2) function growth.
Log(4) = 2,
Log(16) = 4,
Log(256) = 8,
Log(65536) = 16,
Log(4,294,967,296) = 32
Assuming other things remaining unaffected, theoretically that means in a set of 4 million the operation should be about 4 times slower than in a set of 250 elements.