code-optimizer

Solid

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.

Data & Documents 160 stars 17 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Code Optimizer Improve code performance, memory usage, and efficiency through systematic optimization. ## Core Capabilities This skill helps optimize code by: 1. **Analyzing performance bottlenecks** - Identifying slow or inefficient code 2. **Suggesting optimizations** - Providing concrete improvements with examples 3. **Explaining trade-offs** - Describing benefits and potential drawbacks 4. **Measuring impact** - Estimating performance gains 5. **Preserving correctness** - Ensuring optimizations don't change behavior ## Optimization Workflow ### Step 1: Identify Optimization Opportunities Analyze code to find performance bottlenecks. **Look for:** - Nested loops (O(n²) or worse complexity) - Repeated expensive operations - Inefficient data structures - Unnecessary object creation - Database N+1 queries - Blocking I/O operations - Memory leaks or excessive allocation **Quick Analysis Questions:** - What is the time complexity? Can it be reduced? - Are there repeated calculations that could be cached? - Is the right data structure being used? - Are there unnecessary copies or allocations? - Can operations be batched or parallelized? ### Step 2: Categorize the Optimization Determine the type of optimization needed. **Execution Speed:** - Algorithm optimization (better complexity) - Loop optimization - Caching/memoization - Lazy evaluation - Parallel processing **Memory Usage:** - Reduce object creation - Use generators/streams instead of lists - Clear reference...

Details

Author
ArabelaTso
Repository
ArabelaTso/Skills-4-SE
Created
6 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category