SciTools/iris — pull request #637 by rhattersley (2013-07-24 10:19:49+00:00)
Title: Fast add coords

This PR has two main aspects:
1. It modifies the PP/GRIB load rules (via SciTools/iris-code-generators#8 which should be merged first) so all the coordinates are collated instead of added directly to the Cube. (Similar changes are also applied to non-coordinate metadata.) The coordinates are then supplied to the Cube constructor.
2. It speeds up the addition of coordinates during the Cube constructor by using a quick uniqueness check where possible instead of the full, slow `self.coords(coord=coord)` check done by `Cube.add_dim_coords()` and `Cube.add_aux_coords()`.

Approx 7% performance boost doing iris.load_cubes() on a 17MB PP file containing 2048 fields.