Assuming our spec will be -
Has +3% haste from arcane, since blazing speed got nerfed.
Frostfire Orb vs. Shattered Barrier is the only thing I could see being arguable really, which is a non-factor in the math.
Assuming our priority will be-
1. Get hit and spell pen cap (of course)
2. Get crit to the % where it's increase in average shatter damage becomes less than mastery's increase to average shatter damage (assuming somewhere between 60 and 90%)
3. Stack mastery to +X% damage on frozen targets
4. If @ gear level you can afford it with, stack haste until you can fit one extra spell into DF
5. Stack more mastery
This is for optimal shatter damage and damage inside DF of course.
Assuming our shatter damage is more important by far than anything else now, damage outside shatter/FoF will be pretty much insignificant. I think it's obvious this will be the case, but feel free to argue against 240%+ more damage with frostbolt on frozen targets. :P
Things that would be good to know -
1. What % we want our crit at before starting to stack mastery
2. How high our crit/mastery need to be before it's a damage increase to get X% haste, where X is of course enough to fit an extra cast inside DF window
3. After 1 & 2 are accomplished, continue to gear mastery, get closer to 100% crit, get more haste, or some combination of the 3 at a particular ratio?