Before changing anything to make it faster, time it, find the slow part and write the number down. Then time it the same way after the change. Without both numbers, nobody can say the change helped.
An agent reads code and spots what looks slow, and what looks slow often isn't what is slow. It reports the improvement in the same confident voice either way. So make the number part of the work you ask for, because it is the one thing it can't produce by reasoning.
Say it to your agent
“Don't change anything yet. Run hyperfine --warmup 3 --runs 20 "bun run scripts/report.ts" and show me the mean and the spread. Make your change, run the same command, and put both results in the pull request. If the two ranges overlap, tell me it made no measurable difference.”