Логотип Rseng Performance Profiling

Rseng Performance Profiling

Спільнота
fdiblen
rseng-performance-profiling

Covers making research code faster with evidence: profiling before optimizing (py-spy and language-native profilers), interpreting hotspots, choosing optimizations by measured payoff, benchmark regression tracking with airspeed velocity (asv), and scaling measurements. Use when the user says their code is slow, asks to optimize or speed something up, wants benchmarks or performance regression tests, or before recommending rewrites, parallelism or GPUs on performance grounds.

Огляд

Видавецьfdiblen
Репозиторійrseng-agent-skills
Назва навичкиrseng-performance-profiling
Зірки
26
Форки
2
Файли в пакеті
1
ЛіцензіяCC-BY-4.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 1

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем fdiblen. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Rseng Performance Profiling у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/fdiblen/rseng-agent-skills/tree/main/skills/rseng-performance-profiling
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fdiblen/rseng-agent-skills.git /tmp/rseng-agent-skills
mkdir -p .claude/skills
cp -r /tmp/rseng-agent-skills/skills/rseng-performance-profiling .claude/skills/rseng-performance-profiling
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Rseng Performance Profiling в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Rseng Performance Profiling, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Rseng Performance Profiling не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Performance profiling and optimization

The cardinal rule: never optimize unprofiled code. Intuition about where research code spends time is wrong often enough that acting on it wastes effort and adds complexity to the wrong places. The discipline is a loop: measure, find the dominant cost, fix only that, measure again, stop when it is fast enough for the science. "Fast enough" is a research judgment - a one-off analysis needs no tuning; a per-particle inner loop run for months justifies serious work.

Profile first

  • Whole-program view: a sampling profiler (py-spy for Python: py-spy top --pid on a live process or py-spy record for a flame graph) shows where time actually goes with negligible overhead and no code changes. Language-native equivalents: perf (compiled code), Rprof (R), @profile/BenchmarkTools (Julia).
  • Line/function view once a hotspot is known: cProfile+snakeviz, line-profiler, or the IDE's profiler.
  • Memory matters separately: allocation churn and swapping look like CPU slowness; profile memory when RSS grows or the machine swaps.
  • Profile REPRESENTATIVE inputs at meaningful scale - toy inputs have different hotspots than production ones.

Report findings as fractions ("68% of runtime in distance_matrix"), not feelings; the fraction bounds the possible speedup (Amdahl's law) and justifies - or kills - the optimization.

Optimize in payoff order

  1. Algorithmic: a better algorithm or data structure beats any micro-optimization; check complexity before code details.
  2. Do less: cache repeated computation, hoist work out of loops, short-circuit, avoid recomputing unchanged pipeline stages (rseng-workflows).
  3. Use optimized building blocks: vectorized NumPy/BLAS operations, compiled library routines - most scientific speedups come from replacing interpreted loops with library calls (rseng-language-guides).
  4. Compile the hotspot: Numba/Cython/C extension for the proven hot function only.
  5. Parallelize last, and match the tool to the shape: threads/ processes on one node, job arrays or MPI on clusters (rseng-hpc-computing), GPUs for data-parallel numeric work (rseng-gpu-computing), distributed frameworks for larger-than- memory data (rseng-big-data-processing).

Preserve correctness at each step: run the tests (rseng-testing) after every optimization, with numerical tolerances where results legitimately differ (bit-identical is often the wrong bar - rseng-numerical-accuracy).

Keep it fast: benchmark tracking

One-off optimization decays; regressions arrive silently in innocent-looking commits. airspeed velocity (asv) runs a benchmark suite across commits, tracks results over time and flags regressions - the performance analogue of a test suite. Start small: benchmark the 3-5 operations users actually wait on, wire the run into CI or a scheduled job (rseng-ci-cd), and treat an unexplained regression like a failing test.

For quick comparisons during work, timeit/hyperfine with repeated runs and reported variance beat single stopwatch numbers; pin the environment (rseng-reproducible-environments) so timings compare across machines honestly - and record the hardware in any published benchmark.

Scaling measurements

Before requesting bigger allocations, measure scaling: run the same problem at 1, 2, 4, 8 workers (strong scaling) or grow the problem with workers (weak scaling), and plot efficiency. Recommending more hardware without a scaling curve is guesswork; the curve also feeds honest resource requests (rseng-hpc-computing) and energy accounting (rseng-green-computing).

Working with this skill

This skill is source-independent: its authority is the profiler and benchmark-tool documentation linked below and standard performance engineering practice.

Learn more (verified):

Related skills

Check whether any of these applies before moving on:

  • rseng-big-data-processing - memory-bound escalation path
  • rseng-ci-cd - benchmark regression tracking in CI
  • rseng-gpu-computing - GPU port only after profiling evidence
  • rseng-green-computing - speedups cut energy proportionally
  • rseng-hpc-computing - scaling curves before big allocations
  • rseng-numerical-accuracy - tolerances when optimizations shift results

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Rseng Performance Profiling?

Covers making research code faster with evidence: profiling before optimizing (py-spy and language-native profilers), interpreting hotspots, choosing optimizations by measured payoff, benchmark regression tracking with airspeed velocity (asv), and scaling measurements. Use when the user says their code is slow, asks to optimize or speed something up, wants benchmarks or performance regression tests, or before recommending rewrites, parallelism or GPUs on performance grounds.

Навіщо використовувати Rseng Performance Profiling у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Rseng Performance Profiling — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Rseng Performance Profiling у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/fdiblen/rseng-agent-skills/tree/main/skills/rseng-performance-profiling. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Rseng Performance Profiling?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Rseng Performance Profiling?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Rseng Performance Profiling — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Rseng Performance Profiling?

Так. Навичку опубліковано на GitHub: fdiblen, за ліцензією CC-BY-4.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇