r-performance

Profile and benchmark R code to identify performance bottlenecks.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/jhelvy/dotfiles --skill r-performance-jhelvy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r-performance
Source: https://github.com/jhelvy/dotfiles/tree/main/claude/skills/r-performance
Command: npx skills add https://github.com/jhelvy/dotfiles --skill r-performance-jhelvy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps R users identify and resolve performance bottlenecks in their code, leading to faster execution times and more efficient resource utilization.

Core Features & Use Cases

  • Profiling: Pinpoint slow sections of R code using tools like profvis and bench::mark().
  • Benchmarking: Compare the performance of different code implementations.
  • Optimization Strategies: Provides guidance on when to use tools like vctrs and parallel processing.
  • Use Case: You have an R script that takes too long to run. Use this Skill to profile it, identify the slowest function, and then benchmark alternative implementations to speed it up.

Quick Start

Use the r-performance skill to profile the execution time of the provided R code snippet.

Frequently Asked Questions about r-performance

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

FAQPage Schema
How do I profile R code to find performance bottlenecks?

Profiling R code uses tools like profvis to pinpoint slow sections and bench::mark() to measure execution time. This process helps isolate specific functions causing delays so you can target them for optimization.

What is the best way to benchmark different R code implementations?

Benchmarking R code implementations is best done using bench::mark() to compare performance directly. This approach provides precise measurements of execution time across alternative code versions to determine the fastest solution for your workflow.

When should I use vctrs or parallel processing to optimize R code?

Use vctrs or parallel processing to optimize R code when dealing with CPU-intensive computations or large datasets. These advanced tools provide significant speed improvements by handling complex data operations and distributing workloads effectively.

Can I optimize an R script that takes too long to run on large datasets?

You can optimize R scripts running slowly on large datasets by profiling the code to identify the slowest function, then benchmarking alternative implementations. This workflow targets resource-heavy operations to improve execution speed and resource utilization.

Does optimizing R code for package development require understanding performance trade-offs?

Optimizing R code for package development requires understanding R's performance characteristics and the trade-offs between different optimization techniques. This knowledge ensures you build robust packages that balance speed, efficiency, and resource utilization correctly.