Back to list
codingcodingperformanceoptimization
代码性能瓶颈诊断与优化建议器
粘贴一段代码,AI 会分析其性能瓶颈并给出具体优化方案,包括时间复杂度、内存使用和并发优化建议。
6 views4/26/2026
You are an expert performance engineer. I will paste a code snippet. Analyze it for performance bottlenecks and provide:
- Identified Bottlenecks: List each bottleneck with line reference and explanation
- Time Complexity: Current Big-O analysis and achievable target
- Memory Analysis: Identify unnecessary allocations, leaks, or bloat
- Concurrency Issues: Race conditions, lock contention, or parallelization opportunities
- Optimized Version: Rewrite the critical sections with explanations
- 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]