The basic gauge of the effectiveness of any insulation is its R-value. Insulation is designed to stop the flow of heat. The more heat the insulation stops, the higher the R-value of that insulation.
When compared to fibreglass batt insulation, spray foam insulation has a higher R-value at a given thickness. In other words, 2 inches of spray foam will insulate your roof better than 2 inches of fibreglass batts.
Cellulose fill, either blown-in or applied by hand, also has a higher R-value than fibreglass batts at the same thickness. But, again, the R-value of spray foam insulation is almost twice as high as cellulose fill insulation of the same thickness.
As important as R-value is in how well insulation works, it is not the only thing to consider when choosing the best roof insulation. Moisture will cause both fibreglass batts and cellulose fill to lose R-value. Even slight moisture, that you cant see or feel, can reduce the R-value of fibreglass batts.
Neither fibreglass batts or cellulose fill insulation can seal every gap in your roof. Heat can pass through the open gaps and this reduces the R-value of the insulation, although the R-values...