asm-forge

Analyze and optimize Rust assembly output to fix compiler inefficiencies.

2|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/ahrav/scratch-scanner-rs --skill asm-forge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asm-forge
Source: https://github.com/ahrav/scratch-scanner-rs/tree/main/.claude/skills/asm-forge
Command: npx skills add https://github.com/ahrav/scratch-scanner-rs --skill asm-forge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill tackles the challenge of achieving peak performance in critical code sections by directly analyzing and optimizing the assembly output generated by the compiler.

Core Features & Use Cases

  • Assembly Auditing: Inspects compiler-generated assembly code for inefficiencies like bounds checks, register spills, and missed vectorization.
  • Targeted Optimization: Applies specific source code transformations to improve codegen quality.
  • Benchmark Validation: Ensures optimizations translate to real-world performance gains using benchmarks.
  • Use Case: After profiling identifies a hot function in your Rust application, use this Skill to meticulously examine its assembly, pinpoint performance bottlenecks, and implement precise code changes to squeeze out maximum performance.

Quick Start

Use the asm-forge skill to analyze and optimize the function scanner_rs::engine::core::Engine::scan within the scanner-rs package.

Frequently Asked Questions about asm-forge

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

FAQPage Schema
How do I optimize Rust assembly output to eliminate bounds checks and register spills?

To optimize Rust assembly output, you analyze the compiler-generated code to identify inefficiencies like bounds checks and register spills, then apply targeted source code transformations to improve codegen quality and validate gains with micro-benchmarks.

What causes missed vectorization opportunities in Rust compiler-generated assembly?

Missed vectorization opportunities in Rust assembly occur when the compiler fails to auto-vectorize loops due to complex control flow or data dependencies. Analyzing the assembly output helps pinpoint these bottlenecks for targeted source code optimization.

How do I benchmark Rust performance improvements after modifying source code for better codegen?

To benchmark Rust performance improvements after modifying source code, you run micro-benchmarks on the critical code sections. This validates that the source code transformations translating to assembly-level changes actually deliver real-world performance gains.

When do I need to manually inspect assembly output for Rust performance optimization?

You need to manually inspect assembly output for Rust performance optimization after profiling identifies a hot function. This deep analysis allows you to meticulously examine compiler-generated code and squeeze out maximum performance from critical sections.

Can I use assembly auditing to fix compiler-generated inefficiencies in my Rust application?

Yes, you can use assembly auditing to fix compiler-generated inefficiencies in your Rust application. The process inspects the assembly output for performance bottlenecks and applies specific source code transformations to rectify the identified codegen issues.