# MATLAB Level 10: Performance

> Level 10: Performance of the LoWisa MATLAB course: Vectorisation, Profiling, Memory-Efficient MATLAB. 3 lessons and 9 ideas, each explained in one line.

Performance is level 10 of 12 of the [LoWisa MATLAB course](/courses/matlab/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Vectorisation

- **Vectorise the loop.** The first optimisation is **vectorisation**: the loop restated as array operations.
- **Preallocation.** Growing arrays inside loops copies every pass: **preallocate** with zeros and fill.
- **Built-ins win.** Built-in functions run compiled **C** underneath: your loop competes and loses.

## Profiling

- **The profiler.** The **profiler** attributes time per line: measured hotspots over folklore.
- **timeit.** **timeit** benchmarks functions honestly: warmed, repeated, median reported.
- **Memory in the profiler.** The profiler tracks **memory** too: copies and growth caught beside time.

## Memory-Efficient MATLAB

- **Copy-on-write.** MATLAB copies arrays **lazily**: mutation inside functions triggers the real copy.
- **In-place patterns.** Same-variable operations enable **in-place** updates: x = x + 1 without a second array.
- **Right-sized types.** single and integer types halve memory where **precision** allows: chosen, documented.

## Before and after this level

- **Before:** [Level 9: Object-Oriented MATLAB](/courses/matlab/level-9-object-oriented-matlab/): Classes, Properties and Methods, Reusable Engineering Components.
- **Next:** [Level 11: Testing & Reproducibility](/courses/matlab/level-11-testing-and-reproducibility/): Unit Tests, Reproducible Scripts, Engineering-Quality MATLAB.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does MATLAB Level 10: Performance cover?

Vectorisation, Profiling, Memory-Efficient MATLAB: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 9: Object-Oriented MATLAB, which covers Classes, Properties and Methods, Reusable Engineering Components.

## Learn MATLAB on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/matlab/level-10-performance/ · Updated 2026-11-30
