Help us improve
Share bugs, ideas, or general feedback.
From python-development
Profiles and optimizes Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving application performance.
npx claudepluginhub wshobson/agents --plugin python-developmentHow this skill is triggered — by the user, by Claude, or both
Slash command
/python-development:python-performance-optimizationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive guide to profiling, analyzing, and optimizing Python code for better performance, including CPU profiling, memory optimization, and implementation best practices.
Profiles and optimizes Python code using cProfile, timeit, memory profilers, and best practices for bottlenecks, slow execution, high memory, and latency.
Profiles and optimizes Python code using cProfile, memory profilers, and best practices. Use for debugging slow code, bottlenecks, CPU/memory issues, and app performance.
Profiles Python code for bottlenecks using cProfile and py-spy, applies optimization patterns like generators and NumPy, tunes memory with tracemalloc, and benchmarks with pytest-benchmark.
Share bugs, ideas, or general feedback.
Comprehensive guide to profiling, analyzing, and optimizing Python code for better performance, including CPU profiling, memory optimization, and implementation best practices.
import time
def measure_time():
"""Simple timing measurement."""
start = time.time()
# Your code here
result = sum(range(1000000))
elapsed = time.time() - start
print(f"Execution time: {elapsed:.4f} seconds")
return result
# Better: use timeit for accurate measurements
import timeit
execution_time = timeit.timeit(
"sum(range(1000000))",
number=100
)
print(f"Average time: {execution_time/100:.6f} seconds")
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.