Just give them a profiler. They drill down just like a human would and test stuff and validate. It works great.
And without a profiler they do about as bad as humans: spending a lot of time optimizing code that is rarely used (and then often with small n)
And without a profiler they do about as bad as humans: spending a lot of time optimizing code that is rarely used (and then often with small n)