Making It Faster
Adding a Feature ended with code that works and is complete. Performance tasks start there and add a number: this page takes 8 seconds, this job takes an hour, make it faster. They're the task where the AI is most likely to sound right and be wrong, because it knows every optimization by name and will apply three of them before checking whether any one is the problem. Interviewers grade the measuring as much as the speed-up.
The running example is a made-up timesheet app and this ticket:
The team report page takes 6-8 seconds for big teams. Managers open it every Monday.
Measure Before You Change Anything
Get a number before you touch the code. Without a baseline, you can't say whether your change helped, and "it feels faster" isn't evidence. The baseline also stops the most common waste in these rounds: twenty minutes optimizing code that was never the slow part.
Measure the thing the ticket complains about, at a realistic size. The report is slow "for big teams", so a test fixture with three users won't show it. Ask the AI for a script that seeds a team of the size in the ticket, or a bit larger, and times the endpoint or function end to end. Run it three times and take the middle number, since the first run often pays for cold caches. Record what else is cheap to record, especially the number of database queries, which is often the clearest signal of all.
"Baseline with 200 members and 6 months of entries: 7.1 seconds, and 1,402 queries. That query count is the first thing I want to understand."
At work you'd reach for your company's tracing dashboards. In the interview you probably have a terminal, a timer and
whatever profiler ships with the language, so learn the one-line version for your stack before the day: cProfile or
py-spy for Python, --cpu-prof for Node, a query log for any ORM.