Skip to main content

Software Engineer

Tell me about a time you made slow code noticeably faster. How did you find the bottleneck and what did you change?

BehaviouralMid levelTests: Coding fundamentals & data structures
Drill this questionCreate a free account to answer out loud with Ava and get feedback.

What the interviewer is looking for

  • This question tests coding fundamentals & data structures. Picks data structures for stated reasons, talks about time and memory costs plainly, and describes measuring before optimising.
  • What to bring out: Measuring with a profiler or timings first, identifying the real hotspot, a concrete change such as better algorithm, caching or fewer queries, and verifying the improvement.
  • Expect a follow-up like: Was there a trade-off, such as more memory or more complex code, and was it worth it?

Another way it may be asked: Think of a page, job or function that was too slow. How did you figure out where the time went, and what fixed it?

A structure to follow: STAR, with the weight on Action and Result

  1. Step 1

    Situation

    One or two sentences: where, when and what was at stake. Pick a real example you were close to.

  2. Step 2

    Task

    What you personally were responsible for. Say "I", not only "we", so the coding fundamentals & data structures you showed is visible.

  3. Step 3

    Action

    The two or three things you did and why you chose them over the alternatives. This should be about half your answer.

  4. Step 4

    Result

    What changed, in your own measure of it, and what you would do differently. Only use numbers you can stand behind.

This is guidance on shape, not a script. Use your own real experience and facts; never invent details to fill a gap. See the STAR guide and answer frameworks.

Common slips

  • Describing what the team did without saying what you did.
  • Choosing an example with no clear outcome, or one you cannot answer detailed questions about.
  • Ending on the action and skipping the result and what you learned.

How to practise it

Write two bullet points for each STAR letter, then say the answer aloud in about two minutes.

Browse all questions

Tell me about a time you made slow code noticeably faster. How did you find the bottlen... | How to answer