Back to blog
December 28, 20257 min readMarina

BigO Isn't Performance And That's Where Many Engineers Get Stuck

AlgorithmsBigOPerformance

BigO Isn't Performance And That's Where Many Engineers Get Stuck


Why can two O(n) algorithms feel completely different in practice?


If you've ever wondered that, you're not alone.


This is one of the most common and least obvious difficulties engineers face when learning algorithms and complexity analysis. It usually doesn't affect beginners. It appears once you already have real-world experience and your intuition starts to clash with theory.


BigO Notation Visualization

The mental trap


We're trained to think in terms of what feels expensive:


  • More loops feel slower
  • More objects feel heavier
  • Linked lists feel more complex than arrays

  • So when we learn that two sequential loops can still be O(n), or that iterating over an ArrayList and a LinkedList are both O(n), something feels wrong.


    If arrays and linked lists allocate memory differently, shouldn't that change BigO?


    What BigO does not measure


    BigO does **not** measure:


  • Real execution time
  • Cache efficiency or memory layout
  • CPU-level behavior

  • BigO describes how the number of operations grows as input size grows.


    In other words, it tells you the shape of the curve, not how high the curve is.


    That's why two O(n) algorithms can behave very differently in practice.


    Constants, memory access patterns, and hardware effects still matter, BigO simply chooses to ignore them.


    Why this matters in real engineering


    Understanding this separation helps you make better decisions:


  • BigO helps you avoid solutions that won't scale
  • Implementation details make solutions fast in reality

  • If you only think in BigO, you might ignore cache locality and memory pressure.


    If you only think in performance details, you might ship something that collapses at scale.


    Good engineers need both!