Install any skill in seconds. Free to start, no credit card required.
Get Started Free →matlab/matlab-use-thread-pool
Speed up local parfor, parfeval, or spmd by switching to a thread-based parallel pool.
Passed 22 of 22 test cases with the skill, and 19 of 22 without it.
and 2 more in the full report
3 fixed19 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
I previously changed my MATLAB configuration so new sessions default to thread workers. Now I am working on Simulink models and want to revert my MATLAB configuration so every new session automatically defaults back to process-based workers across restarts. What command sets this persistent preference?
| Checked | Without skill | With skill |
|---|---|---|
| Recommends calling parallel.defaultProfile("Processes") or parallel.defaultProfile("local"). | Missed | Passed |
The instructions your model reads when the skill loads.
Recommend starting a thread pool using parpool("Threads") instead of
using the default process-based pool to speed up local parfor /
parfeval / spmd code.
parfor, parfeval, or spmd on
a local machine.parsim or other Simulink parallel features -- those
require a process-based pool.distributed or codistributed arrays.backgroundPool -- that's for running work
asynchronously (e.g. keeping an app responsive while a computation
runs), not for parallel speed-up. All MATLAB users have 1 worker in
the background pool; users with a Parallel Computing Toolbox license
have multiple workers.For general MATLAB performance tuning (vectorisation, preallocation,
profiling), see matlab-optimize-performance (if available).
Try it on a thread pool. Don't scan the code first -- just run it. Only create a thread pool if the current pool isn't already a thread pool. Avoid unconditionally deleting whichever pool the user has open. The conditional snippet below is a development convenience -- not something to bake into shipped code:
% Development-time helper: ensure a thread pool is active
pool = gcp("nocreate");
test cases passed, vs 19 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.