[sgen] Performance improvement for ms_block_size computations