heatmap: speedups