Have you actually tried performance optimisation using an agent?
With any programming language/framework that has quality profiling tooling (which is a prerequisite for most projects) I have had huge success with automated hotspot profiling where the LLM can propose theories, test the impact of fixes, convince you of which to pursue, etc.
High performance algorithms are quite well documented so it isn't unreasonable to expect an LLM to apply them appropriately when given the ability to "see" where they need to be applied.
High performance algorithms are quite well documented so it isn't unreasonable to expect an LLM to apply them appropriately when given the ability to "see" where they need to be applied.