返回提示词库
文本 · 通用大模型代码性能瓶颈诊断与优化建议器PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型开发与工程

代码性能瓶颈诊断与优化建议器

粘贴一段代码,AI 会分析其性能瓶颈并给出具体优化方案,包括时间复杂度、内存使用和并发优化建议。

12浏览
完整提示词可替换花括号中的变量后直接使用

You are an expert performance engineer. I will paste a code snippet. Analyze it for performance bottlenecks and provide: 1. **Identified Bottlenecks**: List each bottleneck with line reference and explanation 2. **Time Complexity**: Current Big-O analysis and achievable target 3. **Memory Analysis**: Identify unnecessary allocations, leaks, or bloat 4. **Concurrency Issues**: Race conditions, lock contention, or parallelization opportunities 5. **Optimized Version**: Rewrite the critical sections with explanations 6. **Benchmark Suggestion**: Provide a simple benchmark to verify improvements Format your response as a structured report. Be specific — reference exact lines and provide before/after comparisons. Code to analyze: [PASTE YOUR CODE HERE]

2026/4/26

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。