Loading...
Loading...
Browse 8 real-world technical and behavioral interview questions about Profiling. Review scenarios, edge cases, and architectural best practices.
Stop the bleeding first by rolling back or disabling the suspect path, then find the cause by profiling the saturated process rather than by reading the diff, because a profile names the hot function directly while forty commits offer forty plausible stories. Use this performance analysis answer to show the decision, trade-off, and evidence rather than a memorised definition.
Rank by the total time a statement shape consumes across a measured window rather than by the slowest single execution, then check what that time was spent waiting on before touching the SQL. The cheap statement running ten thousand times a minute usually outranks the ten-second report.
Escape analysis moves a value to the heap when the compiler cannot prove its lifetime ends with the frame that created it, and go build -gcflags=-m prints every decision. Which of those allocations matter is a measurement question, answered with a benchmark, an alloc_space profile and benchstat.
A JIT compiles against a profile gathered earlier, so its fast code rests on assumptions that can be invalidated: a new receiver type at a call site, a branch taken for the first time, a class loaded that gives an interface a second implementation. The method deoptimises and recompiles from a worse profile. It also connects deoptimisation to the point an interviewer is testing.
A fourfold cost for a doubled input is consistent with quadratic growth, but two points fit infinitely many curves and a one-off cliff such as spilling out of memory produces the same ratio. Get a series of ratios across several doublings, then confirm the exponent against the code.
Evaluate the candidate's understanding of the JavaScript event loop, rendering pipeline, and modern techniques for yielding to the main thread to improve INP. Use this frontend answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects performance to the point an interviewer is testing.
Segment the nulls before drawing any conclusion — by date, source system, record type and creating process — because a null rate that clusters is a documented business path nobody mentioned, while one spread evenly is usually a genuine capture defect.
CPython frees an object the instant its reference count reaches zero, so steady growth is usually something still holding a reference rather than a leak. The cycle collector reclaims only reference cycles. Measure with tracemalloc first, then use __slots__ or generators to cut per-object and peak cost.