Logo vun Rseng Performance Profiling

Rseng Performance Profiling

Communautéit
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.

Iwwersiicht

Editeurfdiblen
Repositoryrseng-agent-skills
Skill-Nummrseng-performance-profiling
Stären
26
Forks
2
Matgeliwwert Fichieren
1
LizenzCC-BY-4.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum fdiblen op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Rseng Performance Profiling an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/fdiblen/rseng-agent-skills/tree/main/skills/rseng-performance-profiling
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Rseng Performance Profiling an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Rseng Performance Profiling automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Rseng Performance Profiling net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Rseng Performance Profiling op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Rseng Performance Profiling besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Rseng Performance Profiling an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/fdiblen/rseng-agent-skills/tree/main/skills/rseng-performance-profiling an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Rseng Performance Profiling benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Rseng Performance Profiling benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Rseng Performance Profiling domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Rseng Performance Profiling gratis?

Jo. De Skill gëtt vum fdiblen ënner der Lizenz CC-BY-4.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇