Agent skill · Data & Analytics

matlab-use-thread-pool

Speed up local parfor, parfeval, or spmd by switching to a thread-based parallel pool. Trigger when a user describes slow or disappointing local parallel performance, even if they don't mention threads. Symptoms: parfor on a laptop/workstation is slower than expected or "only slightly faster than for"; parfor scales poorly with the number of workers; ticBytes/tocBytes, the Parallel Pool dashboard, mpiprofile, or system tools show large per-worker data transfer; large broadcast variables or sliced inputs make iterations slow; opening a process pool dominates a short workload; user mentions seri

matlabgithub.com/matlabGitHub ↗
claude-codecodexcopilotNOASSERTION
Install
npx skills add matlab/matlab-agentic-toolkit --skill matlab-use-thread-pool --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Version: 1.0
Declared author: MathWorks
Requires: >=R2020a
Path: skills-catalog/parallel-computing/matlab-use-thread-pool/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 868
Language: MATLAB

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Use a Thread-Based Parallel Pool Recommend starting a thread pool using `parpool("Threads")` instead of using the default process-based pool to speed up local `parfor` / `parfeval` / `spmd` code. ## When to Use - User asks to improve performance of `parfor`, `parfeval`, or `spmd` on a local machine. - Code passes large arrays into iterations or broadcasts them across workers; user mentions slow start-up, serialization, or data transfer. - User asks "Processes or Threads?" or wants Threads as the default. ## When NOT to Use - User is running on a **cluster** -- thread pools are local-only. - Code uses `parsim` or other Simulink parallel features -- those require a process-based pool. - Code uses `distributed` or `codistributed` arrays. - User wants `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). ## Workflow 1. **Try it on a thread po

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Workflow
  4. What threads actually save
  5. Convention
Ships with 1 file
  • manifest.yaml
More from matlab-agentic-toolkit
All skills →
About this skill
What does the matlab-use-thread-pool skill do?

Speed up local parfor, parfeval, or spmd by switching to a thread-based parallel pool. Trigger when a user describes slow or disappointing local parallel performance, even if they don't mention threads. Symptoms: parfor on a laptop/workstation is slower than expected or "only slightly faster than for"; parfor scales poorly with the number of workers; ticBytes/tocBytes, the Parallel Pool dashboard, mpiprofile, or system tools show large per-worker data transfer; large broadcast variables or sliced inputs make iterations slow; opening a process pool dominates a short workload; user mentions seri

How do I install it?

Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-use-thread-pool --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going