polyglot-performance

Select and implement performance-critical code in Python, Cython, or Rust.

Updated Dec 6, 2025
One-click install
npx skills add https://github.com/pauljroma/pt-performance --skill polyglot-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polyglot-performance
Source: https://github.com/pauljroma/pt-performance/tree/main/.claude/skills/polyglot-performance
Command: npx skills add https://github.com/pauljroma/pt-performance --skill polyglot-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenge of slow-performing code by intelligently selecting the most appropriate language—Python, Cython, or Rust—to achieve optimal performance for critical sections of your application.

Core Features & Use Cases

  • Language Selection: Automatically chooses between Python (baseline), Cython (10-100x speedup), and Rust (100-1000x speedup) based on performance needs and code patterns.
  • Performance Optimization: Optimizes hot loops, numerical computations, parallel processing, and systems-level tasks.
  • Use Case: You have a Python function that processes millions of data points and takes several minutes. This Skill can analyze the code and automatically rewrite the performance-critical part in Cython or Rust to achieve significant speedups, reducing execution time to seconds or milliseconds.

Quick Start

Ask Claude to optimize your slow Python code, and it will automatically select the best language for the job.

Frequently Asked Questions about polyglot-performance

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

FAQPage Schema
How do I optimize slow Python code with Cython or Rust?

You can optimize slow Python code by analyzing performance-critical sections and rewriting them in Cython or Rust, targeting hot loops and numerical computations for 10x to 1000x speedups based on your specific performance requirements.

When should I use Cython vs Rust for Python performance optimization?

Choose Cython for 10-100x speedups in numerical computations, or Rust for 100-1000x speedups in systems-level tasks and parallel processing. The Skill selects the best language by analyzing code patterns and performance needs.

Can I speed up Python parallel processing and hot loops without rewriting everything?

Yes, you can speed up Python parallel processing and hot loops by isolating performance-critical code sections and rewriting only those parts in Cython or Rust, preserving your existing Python codebase architecture.

What is the best way to handle Python performance bottlenecks in numerical computations?

The best way to handle Python performance bottlenecks in numerical computations is analyzing code patterns to determine if Cython or Rust integration is needed, achieving significant speedups for functions processing millions of data points.

Do I need to manually manage architecture tradeoffs when integrating Rust into Python?

No, you do not need to manually manage architecture tradeoffs. The Skill integrates with o1 reasoning to handle architecture design and tradeoff analysis, evaluating language-specific strengths for optimal Rust or Cython integration.