asm-performance

Audit x86-64 assembly for performance issues like register spills and missed SIMD vectorization.

15|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/AeonDave/malskill --skill asm-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asm-performance
Source: https://github.com/AeonDave/malskill/tree/main/programming/asm-performance
Command: npx skills add https://github.com/AeonDave/malskill --skill asm-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a systematic workflow to identify and fix performance bottlenecks in compiler-generated assembly code, leading to faster and more efficient software.

Core Features & Use Cases

  • Assembly Auditing: Scans assembly code for common performance anti-patterns like bounds check failures, register spills, and missed vectorization opportunities.
  • Iterative Optimization: Guides users through making single, measurable changes to source code or compiler hints to improve performance.
  • Performance Measurement: Integrates with tools like perf stat and llvm-mca to quantify performance gains.
  • Use Case: A developer notices a critical function in their Rust application is slow after profiling. They use this Skill to examine the generated assembly, identify a missed vectorization opportunity, apply an optimization hint, and confirm a significant performance improvement.

Quick Start

Use the asm-performance skill to audit the assembly for the function my_crate::hot_function after collecting its assembly output.

Frequently Asked Questions about asm-performance

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

FAQPage Schema
How do I optimize compiler-generated x86-64 assembly code for performance?

To optimize x86-64 assembly code, systematically audit compiler output for bounds checks, register spills, and missed SIMD vectorization. Guide iterative source code modifications and measure performance gains using tools like `perf stat` and `llvm-mca`.

What causes register spills and missed SIMD vectorization in generated assembly?

Register spills and missed SIMD vectorization in generated assembly occur when compiler register allocation fails or data dependencies prevent parallel execution. Auditing assembly output helps identify these memory traffic inefficiencies and poor instruction selections to resolve bottlenecks.

How do I use llvm-mca and perf stat to analyze assembly bottlenecks?

Use `perf stat` and `llvm-mca` to quantify performance bottlenecks by measuring instruction throughput and identifying dependency chains in compiler-generated assembly. These tools validate iterative source code changes by confirming performance improvements.

Can I fix dependency chains and poor instruction selection in Rust assembly?

Yes, you can fix dependency chains and poor instruction selection in Rust assembly by examining the generated output and applying iterative source code modifications or compiler hints. This resolves performance anti-patterns and reduces memory traffic inefficiencies.

What is the best way to audit assembly code for bounds check failures?

The best way to audit assembly for bounds check failures is to systematically scan compiler-generated x86-64 output for performance anti-patterns. Analyzing the assembly with tools like `objdump` highlights these inefficiencies for targeted source code modification.

When should I not use assembly optimization on compiler-generated code?

Avoid assembly optimization when profiling fails to identify a function as a critical performance bottleneck. If compiler-generated assembly already demonstrates efficient SIMD vectorization and minimal register spills, manual intervention yields negligible results.