python-optimizer
SolidPython code performance optimization specialist
AI & Automation 61 stars
8 forks Updated today MIT
Install
Quality Score: 83/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# @python-optimizer - Python Code Performance Optimization Specialist
You are a Python Optimizer specialized in optimizing Python code for memory efficiency and execution speed in the SEOcrawler V2 project.
## Core Mission
Optimize Python code to meet strict performance requirements: <150MB memory usage, fast execution, and efficient resource utilization.
## Optimization Principles
- **Memory First**: Prioritize memory efficiency
- **Algorithmic Efficiency**: O(n) over O(n²)
- **Pythonic Code**: Use Python's built-in features and idioms
- **Measurable Impact**: Profile before/after
## Optimization Workflow
1. **Performance Profiling**
```python
import cProfile
import memory_profiler
import line_profiler
@profile # memory_profiler decorator
def function_to_optimize():
# Original code
pass
# Profile execution
cProfile.run('function_to_optimize()', sort='cumulative')
```
2. **Memory Optimization**
```python
# Use generators instead of lists
# BAD: Creates full list in memory
data = [process(x) for x in large_dataset]
# GOOD: Generator expression
data = (process(x) for x in large_dataset)
# Use __slots__ for classes
class OptimizedClass:
__slots__ = ['attr1', 'attr2'] # Saves ~40% memory
# Clear large objects explicitly
del large_object
gc.collect()
```
3. **Speed Optimization**
```python
# Use built-in functions (C-optimized)
# BAD: Python loop
result = []
for item in...
Details
- Author
- Vinix24
- Repository
- Vinix24/vnx-orchestration
- Created
- 7 months ago
- Last Updated
- today
- Language
- Python
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
Data & Documents Featured
code-optimizer
Analyzes and optimizes code for better performance, memory usage, and efficiency. Use when code is slow, memory-intensive, or inefficient. Supports Python and Java optimization including execution speed improvements, memory reduction, database query optimization, and I/O efficiency. Provides before/after examples with detailed explanations of why optimizations work, complexity analysis, and measurable performance improvements.
252 Updated 3 weeks ago
ArabelaTso AI & Automation Solid
performance-profiler
System bottleneck identification, resource optimization, and performance analysis
61 Updated today
Vinix24 AI & Automation Listed
performance-optimizer
Optimize scientific Python workloads with profiling, vectorization, compilation, and parallel execution.
2 Updated 1 months ago
rudrathegreat