Global optimization of histograms | Synapse