Start free trial
Take Naologic for a spin today, no credit card needed and no obligations.
Start free trial

Asymptotic Computational Complexity - Is O log n faster than O n?


Generally, O(log n) tends to be faster than O(n), particularly when dealing with larger input sizes. This is because the growth rate of logarithmic time complexity is slower than linear time complexity. As the input size, or 'n', increases, the performance difference between O(log n) and O(n) becomes more significant.