Optical critical dimension (OCD) library matching measures a periodic nanostructure's geometry by comparing its measured light-scattering signature against a pre-computed library of signatures for many candidate geometries, selecting the best match as the measurement result. Because the library approach pre-computes signatures for a defined range of geometric parameters before measurement ever begins, library matching can return a measurement extremely fast, at the cost of only being accurate within the geometric range the library was originally built to cover.