0Pricing
Mojo Academy · Lesson

Searching the Parameter Space

Evaluate candidates and pick a winner.

Searching the Parameter Space is a free Mojo Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Mojo Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

The Space of Choices

Every combination of your knobs forms the parameter space. Searching it means trying combinations and finding which one runs fastest.

Enumerate the Candidates

First list the values each knob may take. The set of all pairings of tile and width gives the candidates to evaluate.

alias tiles = (16, 32, 64)
alias widths = (4, 8, 16)

Build Each Candidate

For every combination, the compiler builds a specialized version of the kernel with those exact parameter values baked in.

Time Each One

Run each candidate on a representative input and record how long it takes. Honest timing is what makes the comparison meaningful.

Warm Up First

Discard the first few runs as warm-up. Caches and the CPU settle in, so early timings are noisy and not representative.

Repeat to Reduce Noise

Time each candidate several times and take the best or median. Repetition smooths out random noise from the operating system.

Compare Fairly

Feed every candidate the same input and the same workload size, so the only thing that varies is the configuration under test.

Pick the Winner

The candidate with the lowest time becomes the winner. That parameter set is the one your code should specialize on.

Full Search vs Sampling

A small space allows a full grid search of every combination. A large one may need sampling so tuning does not take forever.

Search Cost Is Up Front

The search happens once, ahead of deployment. You pay tuning time now to enjoy faster runs for every execution afterward.

Record What You Found

Save the winning values so you can reuse them. A logged result means you do not repeat the whole search next time.

Quick Check

Recall how a candidate is chosen during the search.

Recap

You enumerated candidates, built and timed each on a fair workload, smoothed out noise, and picked the fastest configuration as the winner. 🎯

Frequently asked questions

Is the “Searching the Parameter Space” lesson free?

Yes — the full text of “Searching the Parameter Space” is free to read here on the web, and the Mojo Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Mojo Academy course, upgrade to CoddyKit PRO.

What will I learn in “Searching the Parameter Space”?

Evaluate candidates and pick a winner. You practise Mojo Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Mojo Academy?

No prior experience is required. Mojo Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Searching the Parameter Space” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Mojo Academy lesson?

Yes. Every Mojo Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. What Autotuning Solves
  2. Parameterizing Tile and Width
  3. Searching the Parameter Space
  4. Locking In the Best Config
← Back to Mojo Academy