performance-tuning
Skill0 starsChanged 2 days agoMITView on GitHub
Make Julia code faster without lying: measure with @time and @btime, find type instability and allocation, change one thing, prove the delta from fresh processes. Use when a Julia program is slow or a speedup is claimed.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- rui66648/agents-dev-rulestheir own version, first seen Nov 22, 2026
- SpencerGoss/agent-engineeringtheir own version, first seen Nov 20, 2026
- RMATI-11861/Claude-Skillstheir own version, first seen Nov 16, 2026
- NoobyGains/godmodetheir own version, first seen Nov 1, 2026
- 0King0P/Claude-Skillstheir own version, first seen Oct 13, 2026
- devpilotX/skillstheir own version, first seen Sep 22, 2026
Used with
Projects with it also use writing-skills, test-driven-development and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenAISkillwriting-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Also in 3 projects that use this
OpenAISkilltest-driven-development
Use when implementing any feature or bugfix, before writing implementation code
Also in 3 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 5 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- NoobyGains/godmode★ 140same name
- jdanigo/hydraia★ 8same name
- polardb/polardb-pg-skills★ 2same name
- harrissohail6/claude-code-config★ 1same name
- 0King0P/Claude-Skills★ 0same name
- devpilotX/skills★ 0same name
- kiko197/skill★ 0same name
- poteto0/my-skills★ 0same name
- RMATI-11861/Claude-Skills★ 0same name
- rui66648/agents-dev-rules★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository55 other files it gives its agents.
- advanced-optimizationSkill
- bayesian-inferenceSkill
- bayesian-pinnSkill
- bayesian-ude-workflowSkill
- catalyst-reactionsSkill
- continuum-mechanics-and-rheologySkill
- control-theorySkill
- creating-julia-appSkill
- debugging-toolkitSkill
- differential-equationsSkill
- differentiationSkill
- equation-discoverySkill
- experiment-trackingSkill
- fem-feaSkill
- julia-graph-neural-networksSkill
- julia-languageSkill
- julia-ml-and-dlSkill
- julia-model-deploymentSkill
- julia-paper-implementationSkill
- julia-pro-helpSkill
- julia-pro-modeSkill
- julia-reinforcement-learningSkill
- modeling-toolkitSkill
- neural-pdeSkill
- nonlinear-dynamicsSkill
- numerical-methods-implementationSkill
- package-development-workflowSkill
- physical-learning-systemsSkill
- playbook-debugSkill
- playbook-model-validateSkill
- playbook-package-releaseSkill
- playbook-paper-implementSkill
- playbook-perfSkill
- playbook-test-specSkill
- principle-both-sidesSkill
- principle-breakingSkill
- principle-file-is-truthSkill
- principle-gateSkill
- principle-limitsSkill
- principle-loud-failureSkill
- principle-one-stepSkill
- principle-proof-listSkill
- principle-rebuttalSkill
- principle-runtime-surfaceSkill
- principle-three-boundsSkill
- principle-three-clocksSkill
- scientific-visualizationSkill
- sciml-and-diffeqSkill
- setup-julia-proSkill
- signal-processingSkill
- simulation-and-hpcSkill
- statistical-physicsSkill
- symbolic-mathSkill
- web-development-juliaSkill
- zarr-cloud-arraysSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Run each three times: the first call is compilation, the second may hit a different method instance, the third is steady state.
- Distinctive: line 45
When the answer is "it depends on input", give the crossover point — the size at which the lever flips.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Performance tuning
Julia's cost model has three clocks, and a change usually trades one for another: compile time to first result, steady-state runtime per call, and the memory traffic that decides whether the other two hold under load.
principle-three-clocks is the judgement; this file is the levers.
Measure before choosing a lever
@time f(x) # includes compilation on the first call
@btime f($x) # BenchmarkTools: steady state, no compilation noise
@allocated f(x) # bytes per call; the number most fixes move
@code_warntype f(x) # red = non-concrete type reaching a branchRun each three times: the first call is compilation, the second may hit a different method instance, the third is steady state. Report which clock you measured — a "10× faster" claim that only moved compile time is a claim about the wrong clock.
Symptom to lever
| Symptom | Lever | Check |
@code_warntype shows Any/Union | a function barrier, or a type annotation on the container, not on the argument | @inferred f(x) |
| allocations on the hot path | preallocate and mutate in place; @views; setindex! | @allocated drops to the output only |
| a closure captures a reassigned variable | a let block, or pass the value as an argument | @code_lowered shows the box |
| seconds on the first call | a precompile workload (PrecompileTools.@compile_workload) | --startup-file=no timing |
slow before main runs | SnoopCompile for invalidations | SnoopCompile.report_invalidations() |
| one core busy | Threads.@threads, then @spawn for uneven work | Threads.nthreads() > 1 and per-thread timing |
| memory-bound, not compute-bound | @simd, LoopVectorization.@turbo, alignment | --code-coverage=none; loop order |
| GC pauses dominate | avoid boxing in a loop; --heap-size-hint | GC.gc_time share of wall time |
A function barrier is the lever most often missed: the outer function may be type-unstable, but the inner one, called once per element with concrete arguments, still specialises — and that is where the time goes.
Prove the delta
A speedup is a before/after pair measured the same way, on the same machine, in the same process shape.
- Record the baseline in the repo —
benchmarks/with a committed reference — so the next change has something to regress against. - Measure after with the identical command; report both numbers and the ratio.
- State the clock: compile, steady state, or memory. A change that helps steady state and hurts compile time is not "faster" without that sentence.
- When the answer is "it depends on input", give the crossover point — the size at which the lever flips.
Depth
references/profiling-julia-performance.md— Profile.jl, allocation profiling, flame graphs.references/precompiling-julia-package.md— PrecompileTools, sysimages.references/compiler-patterns.md— PackageCompiler.jl, SnoopCompile, shipping.../differentiation/SKILL.md— the AD choice as a performance decision, and its cost.references/julia-hpc-distributed.md— threads, Distributed.jl, MPI.references/julia-gpu-kernels.md— CUDA.jl, kernel-level work.
Done when
There is a measured baseline from a benchmark that reports its own variance (BenchmarkTools), one lever was changed, and the delta is larger than that variance on the same machine; the profile that motivated the lever is kept, since it is what makes the next reader believe the number.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

