Small callgrind-informed optimisation.