SpinTheMic
Pro

Interview practice question

A hot function suddenly becomes slow

Frontend Engineering · JavaScript Core · Experienced

Profiling shows a frequently called function is much slower than expected, and engine logs mention deoptimisation. What could cause this, and how do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Polymorphic inputs (different shapes/types).
  • Changing object shapes after creation (adding/deleting props).
  • arguments misuse, try/catch rare now.
  • Keep types/shapes consistent.
  • Measure with profiler.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics