Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Profiles MATLAB code to find hot lines and slow functions, then verifies output and reports measured speedups from optimizations.
74% 87%+13 ptsof test cases passed
Passed 20 of 23 test cases with the skill, and 17 of 23 without it.
We have a compiled C MEX function fast_matrix_solver.mexw64 that is taking the majority of execution time in our simulation. How should I refactor this MEX binary at the MATLAB script level to make it run 5x faster?
Explains that bottlenecks inside compiled MEX binaries cannot be fixed by M-code refactoring.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Systematic 7-step workflow for finding and fixing performance bottlenecks in MATLAB code.
codegen, MEX), or tuning generated MEX (use the matlab-generate-code skill)matlab-optimize-memory skill)matlab-write-performance-tests skill)profile) rather than the Sampling Profiler (Step 2) — that's a profiler choice, not a reason to skip the skillMeasure current performance so you have a number to improve against:
f = @() targetFunction(input1, input2);
baseline = timeit(f); % handles warm-up and repeats; prefer it to tic/toc
For GPU code use gputimeit. For a script, run it once to warm up, then time a second run with tic/toc. Templates: assets/measurement-templates.md.
Find where the time actually goes — don't guess, profile.
Pick the profiler first: check, don't assume. In R2026b+ the Sampling Profiler is the default: a
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.