O(1) is faster asymptotically as it is independent of the input. ... O(log n) means that the time grows linearly when the input size n is growing exponentially. Note that it might happen that O(log n) is faster than O(1) in some cases but O(1) will outperform O(log n) when n grows as it is independent of input size n.