LLMs can write very performant code, but they have to understand that it's explicitly important to you.
If possible capturing golden inputs/outputs for a block of code, and just asking the agent to optimize while ensuring those goldens pass can be quite effective.
There's a lot of performance-sensitive code where I work (i.e. market data processing) and LLMs have been very effective at reducing our p50, p99, etc...
If possible capturing golden inputs/outputs for a block of code, and just asking the agent to optimize while ensuring those goldens pass can be quite effective.
There's a lot of performance-sensitive code where I work (i.e. market data processing) and LLMs have been very effective at reducing our p50, p99, etc...