skills sourced live from GitHub · all skills listed are free · each skill is provided under its author's license.
home / Coding / Python Performance Optimization Skill by @wshobson
The skill is the plugins/python-development/skills/python-performance-optimization folder inside that repository. Copy it into the folder your agent loads skills from; check your agent's documentation for where that is.
A practical guide to finding and fixing slow Python code using profilers, timing tools and memory analysis.
Starts from measurement: CPU and memory profiling, accurate timing and metrics, then picks optimisation strategies by bottleneck type. Aimed at lowering latency or memory use without guessing where time goes.
The original SKILL.md is organised into these sections:
Written and maintained by @wshobson. It is published under the MIT license, which allows reuse with attribution. See the author profile. SkillDirectory does not claim authorship: this page adds our own review and links back to the original, and the skill's text belongs to its author.
# Python Performance Optimization Comprehensive guide to profiling, analyzing, and optimizing Python code for better performance, including CPU profiling, memory optimization, and implementation best practices. ## When to Use This Skill - Identifying performance bottlenecks in Python applications - Reducing application latency and response times - Optimizing CPU-intensive operations - Reducing memory consumption and memory leaks - Improving database query performance - Optimizing I/O operations - Speeding up data processing pipelines - Implementing high-performance algorithms - Profiling production applications ## Core Concepts ### 1. Profiling Types - **CPU Profiling**: Identify time-consuming functions - **Memory Profiling**: Track memory allocation and leaks - **Line Profiling**: Profile at line-by-line granularity - **Call Graph**: Visualize function call relationships ### 2. Performance Metrics - **Execution Time**: How long operations take …
Excerpt only, quoted from the author's repository. Open the repository for the complete file.