Files
ForgeLM/.agents/skills/perf-optimization/languages/python.md
T

13 lines
530 B
Markdown

# Python Performance Profiling
> **Stub:** This module will be populated when Python profiling is needed in a project.
> Follow the pattern established in [go.md](go.md).
## Expected Content
- Toolchain: `py-spy`, `cProfile`, `memory_profiler`, `line_profiler`, `scalene`
- Patterns: `__slots__`, generator expressions, `collections.deque`, `numpy` vectorization
- Benchmarking: `timeit`, `pytest-benchmark`
- Irreducible floors: GIL contention, interpreter overhead, C extension boundaries
- Script: `scripts/python-pyspy.sh`