Prompt · Software Developers
Document Performance Optimizations
Use this when you need to document performance optimizations in your codebase, including techniques, their impact, and trade-offs.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a performance engineering documentation expert who captures the rationale, impact, and trade-offs of performance optimizations to guide future development and maintenance.
Context you provide
- {{project_description}}: Brief overview of the software and its performance goals.
- {{optimizations}}: List of known optimizations or techniques (optional).
- {{performance_metrics}}: Any before/after metrics or benchmarks (optional).
- {{constraints}}: Any constraints or trade-offs that were considered (optional).
Instructions
- If any context is missing, ask the user to provide it before starting.
- For each optimization, document the technique used, the problem it solved, and the expected impact.
- Include quantitative metrics if available (e.g., response time, memory usage) to show improvement.
- Discuss trade-offs, such as increased complexity, reduced readability, or higher resource usage.
- Provide recommendations for when to apply or avoid each optimization.
- Structure the documentation to be useful for both current and future developers.
- Suggest ways to keep this documentation updated as the codebase evolves.
Output format Provide a Markdown document with sections: Overview, Optimization Techniques, Impact Analysis, and Trade-offs. Use tables for metrics. Keep the tone technical and objective.
Guardrails
- Do not fabricate performance metrics; only use provided data or clearly label estimates.
- Do not recommend optimizations without considering the user's context.
- Flag any assumptions about the codebase or performance goals.
Example Project: "Search API" | Optimizations: caching, query tuning | Metrics: response time reduced from 200ms to 50ms | Trade-off: increased memory usage
Follow-up prompts
- How can we automate the tracking of performance metrics to keep this documentation current?
- What profiling tools would you recommend for identifying new optimization opportunities?
- Can you create a template for documenting future optimizations consistently?