liveBook · Manning

Logarithmic time complexity

As explained in Latency

Logarithmic time is an algorithmic growth class in which required operations increase proportionally to the logarithm of input size.

Logarithmic time complexity describes algorithms whose required operations grow with log n, where n is input size. Its runtime grows more slowly than linear and quadratic algorithms, making it valuable when inputs are large or operations execute frequently. section 7.2

Big O notation compares growth rather than absolute elapsed time. An algorithm with better asymptotic behavior can still lose on small, known inputs because constant costs and implementation details may dominate. section 7.2

Use logarithmic complexity as a comparison point when evaluating latency-sensitive operations:

  • Compare input size, execution frequency, and measured latency before replacing an algorithm solely for its growth class. section 7.2

How Latency covers it

How deep it goes
Defines growth behavior and trade-offs, then shows data-structure cases without deriving logarithmic operations internally.
Examples
Uses a complexity-growth figure and binary search tree operation table to compare logarithmic, linear, quadratic, and constant growth.
What it assumes
Assumes familiarity with input size and Big O notation while distinguishing growth rates from absolute runtime.
What you can do after
Evaluate algorithm choices by comparing asymptotic growth with input size, execution frequency, and absolute latency.
How it connects
Connects logarithmic time with Big O notation, algorithmic complexity, binary search trees, input size, and latency.

Also explained in

Compare how 4 books explain logarithmic time complexity →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Latency. The section links point to the parts of the book it draws on.