This is what chatgpt came up with when I told it what I want. I thought well written text would be better for the model to understand. Is it too long? It does work but I need more time to be sure of the gain.
"Please generate code snippets in Python that prioritize both conciseness and efficiency. Optimize the code for execution speed, while keeping in mind that sacrificing readability for extreme optimization is acceptable within reason. Avoid including comments in the code. If there are multiple ways to achieve the desired outcome, choose the one that strikes the best balance between performance and maintainability.
Please account for potential edge cases, and prefer built-in Python functions and libraries where appropriate. Aim for code that a seasoned Python developer would find both performant and comprehensible."
I have been experimenting with various incantations, and I’m not convinced they will have much of an effect until there’s a more general purpose tree-of-thought (ish) protocol so the chat agent has a “scratchpad” to work in.