optimize

Profile code, identify bottlenecks, and implement benchmarked optimizations.

3|1|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/nashgao/mqtt-client --skill optimize-nashgao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize
Source: https://github.com/nashgao/mqtt-client/tree/main/.claude/skills/optimize
Command: npx skills add https://github.com/nashgao/mqtt-client --skill optimize-nashgao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses performance bottlenecks in code by systematically profiling, identifying issues, and implementing data-driven optimizations.

Core Features & Use Cases

  • Performance Profiling: Measures current performance metrics (CPU, memory, latency) to establish a baseline.
  • Bottleneck Identification: Pinpoints specific areas of code causing performance degradation.
  • Systematic Optimization: Implements targeted fixes with before/after benchmarks to verify improvements.
  • Use Case: Optimize a slow-running Go application by profiling its CPU usage, identifying a computationally expensive algorithm, and then rewriting it for better efficiency, proving the improvement with benchmarks.

Quick Start

Use the optimize skill to profile and improve the performance of the attached Go application.

Frequently Asked Questions about optimize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile a slow-running application to identify performance bottlenecks?

To profile slow-running code and identify bottlenecks, measure current performance metrics like CPU, memory, and latency to establish a baseline. This pinpoints specific code areas causing performance degradation before applying fixes.

What is the best way to optimize code efficiency without breaking functionality?

The best way to optimize code efficiency safely is by following a strict protocol of measurement before and after every optimization. This systematic approach ensures functional integrity while delivering quantifiable performance improvements.

How do I benchmark performance before and after rewriting an expensive algorithm?

Benchmark performance before and after algorithm rewrites by executing systematic before and after measurements. This verifies that the targeted optimization actually improves efficiency and provides data-driven proof of the performance gain.

Can I use systematic profiling to reduce high CPU usage in my software development workflow?

Yes, you can use systematic profiling to reduce high CPU usage in your software development workflow. It measures current CPU performance metrics, identifies computationally expensive algorithms, and guides data-driven improvements.

Why does memory latency spike during code execution and how is it measured?

Memory latency spikes during execution due to underlying bottlenecks, which are measured by establishing a performance baseline. Profiling identifies these specific code areas causing degradation to target for optimization.

When do I need to run benchmarks during the performance tuning process?

You need to run benchmarks before and after every single optimization during performance tuning. This strict measurement protocol ensures functional integrity and verifies that each implemented fix produces quantifiable results.