GraphicsMagic is generally substantially faster than ImageMagics and ad hoc testing shows that this holds for the identify function used for histograms and greyscale statistics. Switching to GM's identify only require a slight change to the output parser.