← Back to Difficulty Selection

Code Review (Warmup): Premature Optimization

Story

This code is fast.

It's also hard to read, hard to change and hard to trust.

Optimizing before you know there's a real problem usually trades clarity for imaginary speed.

Most of the time, the user won't notice - but future developers definitely will.

Rule of thumb:

Make it work. Make it clear. Then make it fast.

Next Topic: Boolean Flag Arguments

Cookies help us track your progress - nothing extra.